Table of Contents

Method LoadFromReader

Namespace
YndigoBlue.Velocity.Utils
Assembly
YndigoBlue.Velocity.dll

LoadFromReader(DataTable, DbDataReader)

Loads data from a DbDataReader into a DataTable with automatic type detection.

public static void LoadFromReader(this DataTable dataTable, DbDataReader reader)

Parameters

dataTable DataTable

The DataTable to load data into.

reader DbDataReader

The DbDataReader containing the data to load.

Remarks

This method reads all data from the reader, detects column types from non-null values, and populates the DataTable with properly typed columns. Columns default to string type if no non-null values are encountered.