Table of Contents

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

T

The 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

map RowMap<T>

The map. null reads as Map<T>() does.

Returns

MappedDbQuery<TParams, T>

The mapped definition, whose parameters are the struct.

Type Parameters

T

The 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

selector Func<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

T

The type each row is mapped to.

Exceptions

ArgumentNullException

selector is null.