[]
        
(Showing Draft Content)

C1.DataConnector.SourceTable.LoadFromReader

LoadFromReader Method

LoadFromReader(DbDataReader, string, Action, Type[])

Create a SourceTable from a DbDataReader. All datarows will be loaded into memory.

Declaration
public static SourceTable LoadFromReader(DbDataReader reader, string newTableName, Action dispose, Type[] columnTypeConversions = null)
Parameters
Type Name Description
DbDataReader reader

An open DbDataReader.

string newTableName

Name of newly-created SourceTable.

Action dispose

This action will be invoked when this SourceTable instance is being disposed. In normal cases it's used to release resources like DbDataReader, DbCommand and DbConnection. Set null to do nothing.

Type[] columnTypeConversions

Optional parameter that must be used if it desired to convert a retrieved field of a row to a specific type.

Returns
Type Description
SourceTable

A SourceTable