예제 #1
0
        public void Delete(CostBindingModel model)
        {
            var element = _costStorage.GetElement(new CostBindingModel
            {
                Id = model.Id
            });

            if (element == null)
            {
                throw new Exception("Затраты не найдены");
            }
            _costStorage.Delete(model);
        }
예제 #2
0
        public void Delete(CostBindingModel model)
        {
            var cost = costStorage.GetElement(
                new CostBindingModel
            {
                Id = model.Id
            });

            if (cost == null)
            {
                throw new Exception("Статья расходов не найдена");
            }

            costStorage.Delete(model);
        }