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