public IActionResult CreateNewExpense()
        {
            ExpensesCreateNewExpenseViewModel ecnevm = new ExpensesCreateNewExpenseViewModel();

            ecnevm.Date = DateTime.Now;
            return(View(ecnevm));
        }
        public IActionResult CreateNewExpense(ExpensesCreateNewExpenseViewModel model)
        {
            if (!TryValidateModel(model))
            {
                return(View(model));
            }

            Expense expense = new Expense
            {
                Amount      = model.Amount,
                Date        = model.Date,
                Description = model.Description
            };

            _expensesDB.Insert(expense);
            return(RedirectToAction(nameof(Index)));
        }