public void CreateExpenseCategory(ExpenseCategoryViewModel expenseCategoryViewModel) { var expenseCategory = Mapper.Map <ExpenseCategoryViewModel, ExpenseCategory_M>(expenseCategoryViewModel); _expenseCategoryRepository.Add(expenseCategory); SaveExpenseCategory(); }
public ActionResult Add(AddExpenseCategoryModel model) { if (ModelState.IsValid) { _repository.Add(model); return(RedirectToAction("List")); } else { return(View(model)); } }