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

Creates and returns a new SqlSet<TResult> using the provided defining query and mapper.

Namespace:  DbExtensions
Assembly: DbExtensions.dll

Syntax

public SqlSet<TResult> From<TResult>(
	SqlBuilder definingQuery,
	Func<IDataRecord, TResult> mapper
)

Parameters

definingQuery

Type: DbExtensions.SqlBuilder
The SQL query that will be the source of data for the set.

mapper

Type: System.Func<IDataRecord, TResult>
A custom mapper function that creates TResult instances from the rows in the set.

Type Parameters

TResult

The type of objects to map the results to.

Return Value

Type: SqlSet<TResult>
A new SqlSet<TResult> object.

See Also

Reference

Database Class
DbExtensions Namespace

© Max Toro Q.