DataExtensions.ReadDataFrame<R>(IDataReader, String, Int32, Boolean) Method

Reads a data frame from a data reader and uses the specified column as row keys.

Definition

Namespace: Extreme.Data
Assembly: Extreme.Data (in Extreme.Data.dll) Version: 3.2.0
C#
public static DataFrame<R, string> ReadDataFrame<R>(
	this IDataReader reader,
	string keyColumn,
	int capacity = 1000,
	bool dropKeyColumn = true
)

Parameters

reader  IDataReader
An IDataReader.
keyColumn  String
The name of the column that contains the row index values.
capacity  Int32  (Optional)
Optional. The initial capacity for the data frame.
dropKeyColumn  Boolean  (Optional)
Optional. Specifies whether the key column should be removed from the data frame. The default is true.

Type Parameters

R
The element type of the row index.

Return Value

DataFrame<R, String>
The data frame with the specified columns read from reader.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IDataReader. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Remarks

Optimal performance is achieved when capacity is equal to the number of rows in the data frame.

See Also