public void Update() { List<OrderItemModel> orderItems = OrderItemManager.GetOrderItems(); OrderItemModel orderItem = orderItems.FirstOrDefault(u => u.Price == 123); orderItem.Price = 321; OrderItemManager.Update(orderItem); OrderItemModel newOrderItem = OrderItemManager.GetOrderItem(orderItem.OrderItemID); Assert.AreEqual(orderItem.Price,newOrderItem.Price); }
// PUT: api/OrderItem/5 public void Put(Guid id, [FromBody] OrderItem make) { OrderItemManager.Update(make); }