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
commandIDbCommandThe IDbCommand to generate a reader from.
behaviorCommandBehaviorThe behavior to use with the data reader.
Returns
- DataTable
The resultant DataTable.