Exemplo n.º 1
0
        public IActionResult AddExpenseToCategory(AddNewExpenseViewModel model)
        {
            List <Category> _categories = _CLogic.GetAllCategories();

            model.Categories = _categories;

            if (model.CategoryId != Guid.Empty)
            {
                _CLogic.AddExpenseToCategory(model.CategoryId, model.ExpenseId);
                return(RedirectToAction("Succes", model));
            }
            return(View(model));
        }