public void DeleteEachExpense(Guid id)
        {
            var expense = _expenseStorage.GetById(id);

            if (expense == null)
            {
                throw new Exception($"Item {id} does not exist!!");
            }
            _expenseStorage.DeleteExpense(expense);
        }
Beispiel #2
0
        public void UpdateEachExpense(Guid id, double amount)
        {
            var expense = _expenseStorage.GetById(id);

            if (expense == null)
            {
                throw new Exception($"Item {id} does not exist!!");
            }

            _expenseStorage.UpdateExpense(expense, amount);
        }
Beispiel #3
0
        public void UpdateEachExpense(Guid id, double amount)
        {
            //Console.WriteLine($"GUID item id is{id}");
            //Console.WriteLine($"Amount is{amount}");
            var expense = _expenseStorage.GetById(id);

            if (expense == null)
            {
                throw new Exception($"Item {id} does not exist!!");
            }

            _expenseStorage.UpdateExpense(expense, amount);
        }