Пример #1
0
        public void CreateExpenseCategory(ExpenseCategoryViewModel expenseCategoryViewModel)
        {
            var expenseCategory = Mapper.Map <ExpenseCategoryViewModel, ExpenseCategory_M>(expenseCategoryViewModel);

            _expenseCategoryRepository.Add(expenseCategory);
            SaveExpenseCategory();
        }
Пример #2
0
        public ActionResult Add(AddExpenseCategoryModel model)
        {
            if (ModelState.IsValid)
            {
                _repository.Add(model);

                return(RedirectToAction("List"));
            }
            else
            {
                return(View(model));
            }
        }