Method Map
- Namespace
- Open.Database.Extensions
- Assembly
- Open.Database.Extensions.Core.dll
Map<T>()
Maps each row to a T by column name, and returns the mapped definition.
public MappedDbQuery<TParams, T> Map<T>()
Returns
- MappedDbQuery<TParams, T>
The mapped definition, whose parameters are the struct.
Type Parameters
TThe type each row is mapped to.
Map<T>(RowMap<T>?)
Maps each row to a T with a map the caller declared, and returns the mapped definition.
public MappedDbQuery<TParams, T> Map<T>(RowMap<T>? map)
Parameters
Returns
- MappedDbQuery<TParams, T>
The mapped definition, whose parameters are the struct.
Type Parameters
TThe type each row is mapped to.
Map<T>(Func<IDataRecord, T>)
Maps each row with a selector, and returns the mapped definition.
public MappedDbQuery<TParams, T> Map<T>(Func<IDataRecord, T> selector)
Parameters
selectorFunc<IDataRecord, T>Called for each row, from any thread and by overlapping calls of the same definition, so it must be safe for concurrent use.
Returns
- MappedDbQuery<TParams, T>
The mapped definition, whose parameters are the struct.
Type Parameters
TThe type each row is mapped to.
Exceptions
- ArgumentNullException
selectoris null.