Click or drag to resize
DaoBaseGetAsDataReaderAsync Method (ITransaction, CommandBehavior, QueryParameters, CancellationToken)
Async variant of GetAsDataReader(ITransaction, CommandBehavior, QueryParameters). Creates a new Retrieval query from the elements passed in and executes that retrievalquery to return an open, ready to use IDataReader. The datareader's command behavior is set to the readerBehavior passed in. If a transaction is specified, 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.2.0.0 (5.2.17.0403)
Syntax
public Task<IDataReader> GetAsDataReaderAsync(
	ITransaction transactionToUse,
	CommandBehavior readerBehavior,
	QueryParameters parameters,
	CancellationToken cancellationToken
)

Parameters

transactionToUse
Type: SD.LLBLGen.Pro.ORMSupportClassesITransaction
The transaction to use, if you execute this method inside a transcation. Specify null otherwise
readerBehavior
Type: System.DataCommandBehavior
The reader behavior to set.
parameters
Type: SD.LLBLGen.Pro.ORMSupportClassesQueryParameters
The parameters.
cancellationToken
Type: System.ThreadingCancellationToken
The cancellation token.

Return Value

Type: TaskIDataReader
Open, ready to use IDataReader

Implements

IDaoGetAsDataReaderAsync(ITransaction, CommandBehavior, QueryParameters, CancellationToken)
Exceptions
ExceptionCondition
ArgumentNullExceptionparameters
Remarks
Advanced functionality: be aware that the datareader returned is open, and the connection used to open this datareader is also open
See Also