public void Delete(int?id) { if (read.GetById(id) == null) { throw new NotFoundOrderException(); } delete.Delete(id); }
private Order GetOrder(int?id) { return(orderRepository.GetById(id) ?? throw new NotFoundOrderException()); }