[]
        
(Showing Draft Content)

C1.DataConnector.SourceTable.InitiateFromReader

InitiateFromReader Method

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

Create a SourceTable from a DbDataReader. Datarows will be lazy-loaded when iterating Rows property.

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

An open DbDataReader

string newTableName
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