Click or drag to resize

IDataAccessAdapterFetchDataReaderAsync Method (IRetrievalQuery, CommandBehavior, CancellationToken)

Async variant of FetchDataReader(IRetrievalQuery, CommandBehavior). Executes the passed in retrievalquery and returns an open, ready to use IDataReader. The datareader's command behavior is set to the readerBehavior passed in. If a transaction is in progress, the command is wired to the transaction.

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
Task<IDataReader> FetchDataReaderAsync(
	IRetrievalQuery queryToExecute,
	CommandBehavior readerBehavior,
	CancellationToken cancellationToken
)

Parameters

queryToExecute
Type: SD.LLBLGen.Pro.ORMSupportClassesIRetrievalQuery
The query to execute.
readerBehavior
Type: System.DataCommandBehavior
The reader behavior to set.
cancellationToken
Type: System.ThreadingCancellationToken
The cancellation token.

Return Value

Type: TaskIDataReader
Open, ready to use IDataReader
Remarks
Advanced functionality: be aware that the datareader returned is open, and the dataaccessadapter's connection is also open. It can be, if the query is set to cache its resultset, that the reader returned is actually a reader over the cached resultset. If you ordered the query to be cached, be sure to pass queryToExecute to the FetchProjection method to cache the resultset.
See Also