public void Delete(CostBindingModel model) { var element = _costStorage.GetElement(new CostBindingModel { Id = model.Id }); if (element == null) { throw new Exception("Затраты не найдены"); } _costStorage.Delete(model); }
public void Delete(CostBindingModel model) { var cost = costStorage.GetElement( new CostBindingModel { Id = model.Id }); if (cost == null) { throw new Exception("Статья расходов не найдена"); } costStorage.Delete(model); }