public RedirectToRouteResult AddItemToCart(CartFunctions cartFunctions, int productId, string url) { Product product = db.Products.FirstOrDefault(m => m.ProductId == productId); if (product != null) { cartFunctions.AddItem(product, 1); } return(RedirectToAction("CartSummary", new { url })); }