public IActionResult EditProfile() { string userID = signInManager.UserManager.GetUserId(HttpContext.User); AccountMyProfileEditVM currentProfile = webShopDBContext.GetUserEditProfile(userID); return(PartialView("_MyProfileEditPartial", currentProfile)); }
//Olika beroende på inloggad eller inte public IActionResult CheckOut() { AccountMyProfileEditVM currentProfile; if (User.Identity.IsAuthenticated) { string userID = signInManager.UserManager.GetUserId(HttpContext.User); currentProfile = webShopDBContext.GetUserEditProfile(userID); } else { currentProfile = new AccountMyProfileEditVM() { FirstName = "", LastName = "", Email = "", PhoneNumber = "", AddressLine = "", ZipCode = "", City = "", }; } return(View(currentProfile)); }