public async Task <IActionResult> Cart() { if (HttpContext.Session.GetString("Id") == null) { return(RedirectToAction(nameof(Products))); } int userId = int.Parse(HttpContext.Session.GetString("Id")); HttpContext.Session.SetString("Cart", "Cart"); var products = await _crud.GetMyProducts(userId); return(View("Products", products)); }