Click or drag to resize

DataAccessAdapterCoreFetchQueryAsyncT Method (CancellationToken, PlainSQLFetchAspects, String, Object)

Async variant of FetchQueryT(PlainSQLFetchAspects, String, Object) Executes the specified plain SQL query using this adapter and projects each row in the resultset to an instance of T. Every parameter value is converted into one or more parameters which have to be pre-defined in the sqlQuery.

Namespace:  SD.LLBLGen.Pro.ORMSupportClasses
Assembly:  SD.LLBLGen.Pro.ORMSupportClasses (in SD.LLBLGen.Pro.ORMSupportClasses.dll) Version: 5.5.0.0 (5.5.18.1019)
Syntax
public virtual Task<List<T>> FetchQueryAsync<T>(
	CancellationToken cancellationToken,
	PlainSQLFetchAspects fetchAspects,
	string sqlQuery,
	Object parameterValues = null
)

Parameters

cancellationToken
Type: System.ThreadingCancellationToken
The cancellation token.
fetchAspects
Type: SD.LLBLGen.Pro.ORMSupportClassesPlainSQLFetchAspects
The fetch aspects for this query. Can be null, in which case the defaults are used.
sqlQuery
Type: SystemString
The SQL query to execute, which returns a resultset. Should contain parameter names for the parameter values, or placeholders for parameter sets. See documentation for details regarding format specifics.
parameterValues (Optional)
Type: SystemObject
The object containing the parameter values to use in the query. If it's an object array, parameters using ordening are assumed, otherwise for each public, non-static property, a parameter is created.

Type Parameters

T
The type of the element to project each row to.

Return Value

Type: TaskListT
A list with 0 or more instances of T, one for each row in the resultset obtained from executing the query constructed from sqlQuery and the specified parameters

Implements

IDataAccessAdapterFetchQueryAsyncT(CancellationToken, PlainSQLFetchAspects, String, Object)
See Also