public void UpdateTest() { List <Food> foodItems = FoodItemManager.Load(); FoodItem foodItem = foodItems.FirstOrDefault(u => u.FDCId == 1104086); foodItem.Quantity = 999; int results = FoodItemManager.Update(foodItem, true); Assert.IsTrue(results > 0); }
// PUT api/values/5 public int Put(int id, [FromBody] Food value) { return(FoodItemManager.Update(value)); }