public ActionResult UpdateProduct(String Product, string TransactionID, string Quantity, string Cost) { List <Orders> ShoppingCart = HomeManager.ReadExistingOrders(TransactionID); // Need to look at quantity too. var itemToRemove = (from item in ShoppingCart where item.Serial == Product select item).FirstOrDefault(); ShoppingCart.Remove(itemToRemove); if (HomeManager.DeleteProducts(ShoppingCart, TransactionID, Product)) { Orders ModifyCart = new Orders { Cost = Cost, Quantity = Quantity, Serial = Product }; ShoppingCart.Add(ModifyCart); if (HomeManager.InsertOrderItem(ShoppingCart, TransactionID)) { } } return(RedirectToAction("About")); }