public IDbCommandAsync CreateCommand() { if (!IsOpen) { throw ExecutionContextException.ConnectionNotOpen(); } var command = Connection.CreateCommand(); if (Transaction != null) { command.Command.Transaction = Transaction; } // Set this, even though in async contexts it will probably be ignored if (_timeoutSeconds > 0) { command.Command.CommandTimeout = _timeoutSeconds; } return(command); }