public IActionResult Index() //MyAccount { if (accVeri.CheckIfLoggedIn(HttpContext.Session.GetInt32("AccountID")) == false) { return(RedirectToAction("LogOut", "Account")); } else { Account account = new Account(); AccountDetailViewModel accountDetailViewModel = new AccountDetailViewModel(); account = accountrepo.GetAccountByID((int)HttpContext.Session.GetInt32("AccountID")); accountDetailViewModel = accountViewModelConverter.ViewModelFromAccount(account); return(View(accountDetailViewModel)); } }