Database.Map<TResult> Method (SqlBuilder, Func<IDataRecord, TResult>)

Maps the results of the query to TResult objects, using the provided mapper delegate.

Namespace:  DbExtensions
Assembly: DbExtensions.dll

Syntax

public IEnumerable<TResult> Map<TResult>(
	SqlBuilder query,
	Func<IDataRecord, TResult> mapper
)

Parameters

query

Type: DbExtensions.SqlBuilder
The query.

mapper

Type: System.Func<IDataRecord, TResult>
The delegate for creating TResult objects from an IDataRecord object.

Type Parameters

TResult

The type of objects to map the results to.

Return Value

Type: IEnumerable<TResult>
The results of the query as TResult objects.

See Also

Reference

Database Class
DbExtensions Namespace

© Max Toro Q.