Click or drag to resize

RetrievalQuery.ExecuteAsync Method

Async variant of Execute(CommandBehavior). Executes the query contained by the IQuery instance. The connection has to be opened before calling Execute().

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 Task<DbDataReader> ExecuteAsync(
	CommandBehavior behavior,
	CancellationToken cancellationToken
)

Parameters

behavior
Type: System.Data.CommandBehavior
The behavior setting to pass to the ExecuteReader method.
cancellationToken
Type: System.Threading.CancellationToken
The cancellation token.

Return Value

Type: Task<DbDataReader>
An open, ready to use IDataReader instance

Implements

IRetrievalQuery.ExecuteAsync(CommandBehavior, CancellationToken)
Exceptions
ExceptionCondition
ORMQueryExecutionException
InvalidOperationExceptionWhen there is no command object inside the query object, or no connection object inside the query object or the connection is closed.
Remarks
Advances the returned datareader to the right resultset described by ResultsetNumber, if possible. If there are less resultsets than ResultsetNumber describes, the last resultset found is returned
See Also