public void Create_Default()
        {
            const int id   = 19334;
            var       test = new DeleteStatusTableStatusCommand <long>(id);

            Assert.Equal(id, test.QueueId);
        }
Example #2
0
 /// <inheritdoc />
 public void Handle(DeleteStatusTableStatusCommand <long> command)
 {
     if (!_databaseExists.Exists(_connectionInformation.ConnectionString))
     {
         return;
     }
     _decorated.Handle(command);
 }
        /// <inheritdoc />
        public void Handle(DeleteStatusTableStatusCommand <long> command, IDbCommand dbCommand, CommandStringTypes commandType)
        {
            dbCommand.CommandText = _commandCache.GetCommand(CommandStringTypes.DeleteFromStatus);
            var param = dbCommand.CreateParameter();

            param.ParameterName = "@QueueID";
            param.Value         = command.QueueId;
            param.DbType        = DbType.Int64;
            dbCommand.Parameters.Add(param);
        }
 /// <inheritdoc />
 public void Handle(DeleteStatusTableStatusCommand <long> command)
 {
     using (var connection = _dbConnectionFactory.Create())
     {
         connection.Open();
         using (var commandSql = connection.CreateCommand())
         {
             _prepareCommand.Handle(command, commandSql, CommandStringTypes.DeleteFromStatus);
             commandSql.ExecuteNonQuery();
         }
     }
 }