public IActionResult Deposit(DepositAmount depositAmount) { // set login user to true ViewBag.IsUserLoggedIn = true; // perform deposit and get updated balance var updateBalance = accountOperations.DepositByID(Convert.ToInt32(loggedinuserId), depositAmount.Amount); // pass updated balance to UI ViewBag.AccountBalance = updateBalance; ViewBag.SuccessfulTransfer = "Deposit Successful!"; // set account id ViewBag.AccountId = accountId; return(View()); }