Exemplo n.º 1
0
 public void DeleteCommand(Command cmd)
 {
     if (cmd == null)
     {
         throw new ArgumentNullException(nameof(cmd));
     }
     _context.Remove <Command>(cmd);
 }
Exemplo n.º 2
0
 public void DeleteCommand(Command command)
 {
     if (command == null)
     {
         throw new ArgumentNullException(nameof(command));
     }
     _commanderContext.Remove(command);
 }
Exemplo n.º 3
0
 public void DeleteCommand(Command cmd)
 {
     if (cmd == null)
     {
         throw new NullReferenceException();
     }
     else
     {
         _dbContext.Remove(cmd);
     }
 }
Exemplo n.º 4
0
        /// <summary>
        /// Deletes
        /// </summary>
        /// <param name="id"></param>
        /// <param name="cancellationToken"></param>
        /// <returns></returns>
        public async Task DeleteCommand(int id, CancellationToken cancellationToken)
        {
            var command = await GetCommandById(id, cancellationToken).ConfigureAwait(false);

            if (command == null)
            {
                throw new ArgumentNullException();
            }

            _context.Remove(command);
            _ = await SaveChanges(cancellationToken);
        }
Exemplo n.º 5
0
 public void DeleteCommand(Command cmd)
 {
     _context.Remove(cmd);
 }