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

Reads the specified columns from a data reader and returns them as a data frame.

Definition

Namespace: Extreme.Data
Assembly: Extreme.Data (in Extreme.Data.dll) Version: 3.2.0
C#
public static DataFrame<long, string> ReadDataFrame(
	this IDataReader reader,
	IEnumerable<string> columnKeys,
	int capacity = 1000
)

Parameters

reader  IDataReader
An IDataReader.
columnKeys  IEnumerable<String>
A sequence of column names.
capacity  Int32  (Optional)
The initial capacity for the data frame.

Return Value

DataFrame<Int64, String>
The data frame 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