SqlHelper..::..ExecuteReaderAsync Method (SqlTransaction, CommandType, String)

Execute a SqlCommand (that returns a resultset and takes no parameters) against the provided SqlTransaction.

Namespace:  Core
Assembly:  Core (in Core.dll)

Syntax


public static Task<SqlDataReader> ExecuteReaderAsync(
	SqlTransaction transaction,
	CommandType commandType,
	string commandText
)

Parameters

transaction
Type: SqlTransaction
A valid SqlTransaction
commandType
Type: CommandType
The CommandType (stored procedure, text, etc.)
commandText
Type: String
The stored procedure name or T-SQL command

Return Value

A SqlDataReader containing the resultset generated by the command

Remarks


e.g.: SqlDataReader dr = ExecuteReaderAsync(trans, CommandType.StoredProcedure, "GetOrders");