DALs.Sql/Extensions/IDbCommandExtensions.cs
/// <summary>
/// execute reader as an asynchronous operation.
/// </summary>
/// <param name="command">The command.</param>
/// <returns>Task&lt;IDataReader&gt;.</returns>
execute reader as an asynchronous operation.
execute reader as an asynchronous operation .
public static async Task<IDataReader> ExecuteReaderAsync(this IDbCommand command)
        {
            var dbCommand = command as DbCommand;
            if (dbCommand != null)
            {
                return await dbCommand.ExecuteReaderAsync();
            }
            return await Task.Run(() => command.ExecuteReader());
        }
public static async Task < IDataReader > ExecuteReaderAsync ( this IDbCommand command ) { var dbCommand = command as DbCommand ; if ( dbCommand != null ) { return await dbCommand . ExecuteReaderAsync ( ) ; } return await Task . Run ( ( ) => command . ExecuteReader ( ) ) ; }
execute reader as an asynchronous operation.
execute reader as an asynchronous operation .
None
IDbCommand
this
command
None