示例#1
0
        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);
        }
示例#2
0
 // PUT: api/OrderItem/5
 public void Put(Guid id, [FromBody] OrderItem make)
 {
     OrderItemManager.Update(make);
 }