public ActionResult AddToCart(int productId) { var productToBeAdded = _productService.GetById(productId); var cart = _cartSessionService.GetCart(); _cartService.AddToCart(cart, productToBeAdded); _cartSessionService.SerCart(cart); TempData.Add("message", String.Format("Your product,{0},was successfully added to the cart!", productToBeAdded.ProductName)); return(RedirectToAction("Index", "Product")); }