Method EnumerateValuesFromOrdinals
- Namespace
- Open.Database.Extensions
- Assembly
- Open.Database.Extensions.Core.dll
EnumerateValuesFromOrdinals(IDataRecord, IEnumerable<int>)
Lazily enumerates the values of the columns at the specified ordinals.
public static IEnumerable<object> EnumerateValuesFromOrdinals(this IDataRecord record, IEnumerable<int> ordinals)
Parameters
recordIDataRecordThe record to read the values from.
ordinalsIEnumerable<int>The ordinals to read. The values are returned in this order.
Returns
- IEnumerable<object>
An enumerable of values matching the ordinals requested. The values are read from the record as the enumerable is enumerated.
Exceptions
- ArgumentNullException
recordorordinalsis null.- IndexOutOfRangeException
An ordinal is not a valid column index for the record. It is thrown while the result is enumerated.
EnumerateValuesFromOrdinals(IDataRecord, IReadOnlyList<int>)
Lazily enumerates the values of the columns at the specified ordinals.
public static IEnumerable<object> EnumerateValuesFromOrdinals(this IDataRecord record, IReadOnlyList<int> ordinals)
Parameters
recordIDataRecordThe record to read the values from.
ordinalsIReadOnlyList<int>The ordinals to read. The values are returned in this order.
Returns
- IEnumerable<object>
An enumerable of values matching the ordinals requested. The values are read from the record as the enumerable is enumerated.
Exceptions
- ArgumentNullException
recordorordinalsis null.- IndexOutOfRangeException
An ordinal is not a valid column index for the record. It is thrown while the result is enumerated.
EnumerateValuesFromOrdinals(IDataRecord, int, params IEnumerable<int>)
Lazily enumerates the values of the columns at the specified ordinals.
public static IEnumerable<object> EnumerateValuesFromOrdinals(this IDataRecord record, int firstOrdinal, params IEnumerable<int> remainingOrdinals)
Parameters
recordIDataRecordThe record to read the values from.
firstOrdinalintThe first ordinal to read.
remainingOrdinalsIEnumerable<int>The remaining ordinals to read, in order.
Returns
- IEnumerable<object>
An enumerable of values matching the ordinals requested. The values are read from the record as the enumerable is enumerated.
Exceptions
- ArgumentNullException
recordis null.- IndexOutOfRangeException
An ordinal is not a valid column index for the record. It is thrown while the result is enumerated.