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();
        }
Esempio n. 2
0
 public void DeleteCategory(ExpenseCategory category)
 {
     _expenseCategoryRepository.Delete(category);
 }
Esempio n. 3
0
 public Task <int> Delete(int id)
 {
     return(_expensecategoryRepository.Delete(id));
 }