public async Task <IActionResult> Index() { var currentUser = await _userManager.GetUserAsync(HttpContext.User); if (currentUser == null) { ViewBag["SM"] = "Вы не авторизованы"; return(RedirectToAction("Index", "Home")); } var wishListProducts = _wishListService.GetWishListDetails(currentUser.Id); return(View(wishListProducts)); }