public ActionResult UpdateCartQuantity(Carrito carrito, int productId, int quantity) { LineaCarrito linea = carrito.Lineas.Where(l => l.Producto.ProductoID == productId).FirstOrDefault(); if (linea != null) { linea.Cantidad = quantity; return(Json(new { Success = true, Total = carrito.ComputeTotalValue(), EnvioGratisAplicable = carrito.EnvioGratisAplicable() }, JsonRequestBehavior.AllowGet)); } else { return(Json(new { Success = false }, JsonRequestBehavior.AllowGet)); } }