public ActionResult AddToCart(int id) { var product = db.Products.Where(x => x.ProductId == id).FirstOrDefault(); CartViewModel.AddProduct(product, 1, User.Identity.Name); return(RedirectToAction("Index")); }