public static string UpdateCartController(Cart cart, int productId) { int equal = AddToCartHandler.returnStock(productId); if (cart.Quantity < 0) { return("Input Invalid!"); } else if (equal < cart.Quantity) { return("There's not enough stock for that product"); } CartHandler.UpdateCartHandler(cart); return("Success"); }