public static OrderItem AddItem(this Order order, string product)
        {
            var orderItem = new OrderItem {Product = product};

            order.AddItem(orderItem);

            return orderItem;
        }
Example #2
0
 public void AddItem(OrderItem orderItem)
 {
     _items.Add(orderItem);
 }