Method Results
- Namespace
- Open.Database.Extensions
- Assembly
- Open.Database.Extensions.Core.dll
Results<T>(IExecuteReader, 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> Results<T>(this IExecuteReader command, IEnumerable<KeyValuePair<string, string?>> fieldMappingOverrides) where T : new()
Parameters
commandIExecuteReaderThe IExecuteReader to iterate.
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).
Results<T>(IExecuteReader, 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> Results<T>(this IExecuteReader command, IEnumerable<(string Field, string? Column)> fieldMappingOverrides) where T : new()
Parameters
commandIExecuteReaderThe IExecuteReader to iterate.
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).
Results<T>(IExecuteReader, params (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> Results<T>(this IExecuteReader command, params (string Field, string? Column)[] fieldMappingOverrides) where T : new()
Parameters
commandIExecuteReaderThe IExecuteReader to iterate.
fieldMappingOverrides(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).