public IActionResult AddBankDetail() { var viewModel = new BankDetailView { BankList = _unitOfWork.BanksRepository.Items.ToList(), }; return(View(viewModel)); }
public IActionResult SaveBankDetail(BankDetailView viewModel) { var accountModel = HttpContext.Session .GetObjectFromJson <AccountDetailView>("AccountDetailView"); if (accountModel.UserDetail == null) { accountModel.BankDetail = new BankDetailView(); } accountModel.BankDetail = viewModel; HttpContext.Session.SetObjectAsJson("AccountDetailView", accountModel); return(RedirectToAction("AddStaffDetail")); }