public void Delete(int?id) { if (read.GetById(id) == null) { throw new NotFoundComputerException(); } delete.Delete(id); }
private Computer GetComputer(int?id) { return(computerRepository.GetById(id) ?? throw new NotFoundComputerException()); }