public async Task <IActionResult> View(int id) { Product product = await _invManager.GetProductByID(id); if (_signInManager.IsSignedIn(User)) { Basket basket = await _bsktManager.GetBasket(_userManager.GetUserId(User)); ViewData["IsInBasket"] = _bsktManager.BasketHasItem(basket, id); } return(View(product)); }