Table of Contents

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

command IDbCommand

The IDbCommand to generate a reader from.

behavior CommandBehavior

The 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

command IDbCommand

The IDbCommand to generate a reader from.

behavior CommandBehavior

The behavior to use with the data reader.

Returns

IEnumerable<T0>

The enumerable of casted values.

Type Parameters

T0

The 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

command DbCommand

The IDbCommand to generate a reader from.

behavior CommandBehavior

The behavior to use with the data reader.

Returns

IEnumerable<T0>

The enumerable of casted values.

Type Parameters

T0

The expected type of the first ordinal.

Remarks

Any DBNull values are then converted to null and casted to type T0.