Method FirstOrdinalResults
- Namespace
- Open.Database.Extensions
- Assembly
- Open.Database.Extensions.Core.dll
FirstOrdinalResults(IDbCommand, CommandBehavior)
Reads the first column from every record.
public static IEnumerable<object?> FirstOrdinalResults(this IDbCommand command, CommandBehavior behavior = CommandBehavior.SequentialAccess)
Parameters
commandIDbCommandThe IDbCommand to generate a reader from.
behaviorCommandBehaviorThe behavior to use with the data reader.
Returns
- IEnumerable<object>
The enumerable of casted values.
Remarks
DBNull values are converted to null.
FirstOrdinalResults<T0>(IDbCommand, CommandBehavior)
Reads the first column from every record.
public static IEnumerable<T0> FirstOrdinalResults<T0>(this IDbCommand command, CommandBehavior behavior = CommandBehavior.SequentialAccess)
Parameters
commandIDbCommandThe IDbCommand to generate a reader from.
behaviorCommandBehaviorThe behavior to use with the data reader.
Returns
- IEnumerable<T0>
The enumerable of casted values.
Type Parameters
T0The expected type of the first ordinal.
Remarks
Any DBNull values are then converted to null and casted to type T0.
FirstOrdinalResults<T0>(DbCommand, CommandBehavior)
Reads the first column from every record.
public static IEnumerable<T0> FirstOrdinalResults<T0>(this DbCommand command, CommandBehavior behavior = CommandBehavior.SequentialAccess)
Parameters
commandDbCommandThe IDbCommand to generate a reader from.
behaviorCommandBehaviorThe behavior to use with the data reader.
Returns
- IEnumerable<T0>
The enumerable of casted values.
Type Parameters
T0The expected type of the first ordinal.
Remarks
Any DBNull values are then converted to null and casted to type T0.