Method ResultsBuffered
- Namespace
- Open.Database.Extensions
- Assembly
- Open.Database.Extensions.Core.dll
ResultsBuffered<T>(IDataReader, params IEnumerable<KeyValuePair<string, string?>>?)
Iterates each record and attempts to map the fields to type T. Data is temporarily stored (buffered in entirety) in a queue before applying the transform for each iteration.
public static IEnumerable<T> ResultsBuffered<T>(this IDataReader reader, params IEnumerable<KeyValuePair<string, string?>>? fieldMappingOverrides) where T : new()
Parameters
readerIDataReaderThe IDataReader to read results from.
fieldMappingOverridesIEnumerable<KeyValuePair<string, string>>An optional override map of field names to column names where the keys are the property names, and values are the column names.
Returns
- IEnumerable<T>
The enumerable to pull the transformed results from.
Type Parameters
TThe model type to map the values to (using reflection).
ResultsBuffered<T>(IDataReader)
Iterates each record and attempts to map the fields to type T. Data is temporarily stored (buffered in entirety) in a queue before applying the transform for each iteration.
public static IEnumerable<T> ResultsBuffered<T>(this IDataReader reader) where T : new()
Parameters
readerIDataReaderThe IDataReader to read results from.
Returns
- IEnumerable<T>
The enumerable to pull the transformed results from.
Type Parameters
TThe model type to map the values to (using reflection).
ResultsBuffered<T>(IDataReader, params IEnumerable<(string Field, string? Column)>?)
Iterates each record and attempts to map the fields to type T. Data is temporarily stored (buffered in entirety) in a queue before applying the transform for each iteration.
public static IEnumerable<T> ResultsBuffered<T>(this IDataReader reader, params IEnumerable<(string Field, string? Column)>? fieldMappingOverrides) where T : new()
Parameters
readerIDataReaderThe IDataReader to read results from.
fieldMappingOverridesIEnumerable<(string Field, string Column)>An optional override map of field names to column names where the keys are the property names, and values are the column names.
Returns
- IEnumerable<T>
The enumerable to pull the transformed results from.
Type Parameters
TThe model type to map the values to (using reflection).