Table of Contents

Method ToDataTables

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

ToDataTables(IDbCommand, CommandBehavior)

Loads all data from a command through an IDataReader into a DataTables. Calls .NextResult() to check for more results.

public static List<DataTable> ToDataTables(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

List<DataTable>

The resultant list of DataTables.