Click or drag to resize
DataQueryBaseTQueryExecuteReaderAsync Method
Asynchronously executes the current query and returns it's results as an IDataReader. The SupportsReader flag indicates whether this operation is supported.

Namespace: CMS.DataEngine
Assembly: CMS.DataEngine (in CMS.DataEngine.dll) Version: 13.0.131
Syntax
C#
public virtual Task<IDataReader> ExecuteReaderAsync(
	CommandBehavior commandBehavior = CommandBehavior.Default,
	bool newConnection = false,
	Nullable<CancellationToken> cancellationToken = null
)

Parameters

commandBehavior (Optional)
Type: System.DataCommandBehavior
Command behavior for the reader.
newConnection (Optional)
Type: SystemBoolean
If true, the reader will be executed using its own dedicated connection.
cancellationToken (Optional)
Type: SystemNullableCancellationToken
The cancellation instruction.

Return Value

Type: TaskIDataReader
Returns a task returning either the data reader resulting from query execution, or null.

Implements

IDataQueryExecuteReaderAsync(CommandBehavior, Boolean, NullableCancellationToken)
Exceptions
ExceptionCondition
NotSupportedExceptionThrown when the query does not support reader.
Remarks
The method returns a task returning null if ReturnsNoResults indicates the query won't result in any results.
See Also