Exemplo n.º 1
0
        public ActionResult Create(CreateBankAccountViewModel model)
        {
            var householdId = User.Identity.GetHouseholdId();

            if (ModelState.IsValid && householdId != null)
            {
                _manager.Add(new BankAccount {
                    HouseholdId = householdId.Value, Name = model.Name, Balance = model.Balance
                });
            }
            return(RedirectToAction(nameof(Index)));
        }
Exemplo n.º 2
0
 public ActionResult Add(BankAccount model)
 {
     BankAccountManager.Add(model, model.CompanyID);
     return(RedirectToAction("Index"));
 }