Table of Contents

Method ToDataTable

Namespace
Open.Database.Extensions
Assembly
Open.Database.Extensions.Core.dll

ToDataTable(IDbCommand, CommandBehavior)

Loads all data from a command through an IDataReader into a DataTable.

public static DataTable ToDataTable(this IDbCommand command, CommandBehavior behavior = CommandBehavior.SequentialAccess)

Parameters

command IDbCommand

The IDbCommand to generate a reader from.

behavior CommandBehavior

The behavior to use with the data reader.

Returns

DataTable

The resultant DataTable.