public void Delete(CustomerBindingModel model) { var element = CustomerStorage.GetElement(new CustomerBindingModel { Id = model.Id }); if (element == null) { throw new Exception("Элемент не найден"); } CustomerStorage.Delete(model); }
public void Delete(CustomerBindingModel model) { var customer = _customerStorage.GetElement(new CustomerBindingModel { Id = model.Id }); if (customer == null) { throw new Exception("Заказчик не найден"); } _customerStorage.Delete(model); }