public void DeleteCommand(Command cmd) { if (cmd == null) { throw new ArgumentNullException(nameof(cmd)); } _context.Remove <Command>(cmd); }
public void DeleteCommand(Command command) { if (command == null) { throw new ArgumentNullException(nameof(command)); } _commanderContext.Remove(command); }
public void DeleteCommand(Command cmd) { if (cmd == null) { throw new NullReferenceException(); } else { _dbContext.Remove(cmd); } }
/// <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); }
public void DeleteCommand(Command cmd) { _context.Remove(cmd); }