Пример #1
0
        public void UpdateExpenseCategory(ExpenseCategoryViewModel expenseCategory)
        {
            var expenseCategoryToRemove = _expenseCategoryRepository.GetById(expenseCategory.CategoryC);
            var updateCustomer          = Mapper.Map <ExpenseCategoryViewModel, ExpenseCategory_M>(expenseCategory);

            _expenseCategoryRepository.Delete(expenseCategoryToRemove);
            _expenseCategoryRepository.Add(updateCustomer);
            SaveExpenseCategory();
        }
Пример #2
0
 public void DeleteCategory(ExpenseCategory category)
 {
     _expenseCategoryRepository.Delete(category);
 }
Пример #3
0
 public Task <int> Delete(int id)
 {
     return(_expensecategoryRepository.Delete(id));
 }