src/Projac.Sql/Executors/ConnectedSqlCommandExecutor.cs
/// <summary>
///     Executes the specified command asynchronously.
/// </summary>
/// <param name="command">The command.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>
///     A <see cref="Task" /> that will return when the <see cref="SqlNonQueryCommand">command</see>
///     was executed.
/// </returns>
/// <exception cref="System.ArgumentNullException">Thrown when <paramref name="command" /> is <c>null</c>.</exception>
Executes the specified command asynchronously.
Executes the specified command asynchronously .
public async Task ExecuteNonQueryAsync(SqlNonQueryCommand command, CancellationToken cancellationToken)
        {
            if (command == null)
                throw new ArgumentNullException("command");
            using (var dbCommand = _dbConnection.CreateCommand())
            {
                dbCommand.Connection = _dbConnection;
                dbCommand.CommandTimeout = _commandTimeout;
                dbCommand.CommandType = command.Type;
                dbCommand.CommandText = command.Text;
                dbCommand.Parameters.AddRange(command.Parameters);
                await dbCommand.ExecuteNonQueryAsync(cancellationToken);
            }
        }
public async Task ExecuteNonQueryAsync ( SqlNonQueryCommand command , CancellationToken cancellationToken ) { if ( command == null ) throw new ArgumentNullException ( " " ) ; using ( var dbCommand = _dbConnection . CreateCommand ( ) ) { dbCommand . Connection = _dbConnection ; dbCommand . CommandTimeout = _commandTimeout ; dbCommand . CommandType = command . Type ; dbCommand . CommandText = command . Text ; dbCommand . Parameters . AddRange ( command . Parameters ) ; await dbCommand . ExecuteNonQueryAsync ( cancellationToken ) ; } }
Executes the specified command asynchronously.
Executes the specified command asynchronously .
A  that will return when the command
A that will return when the command
Thrown when  is null
Thrown when is null
command
SqlNonQueryCommand
None
cancellationToken
CancellationToken
The cancellation token.
The cancellation token .