예제 #1
0
 /// <summary>
 /// Adds an item to the order
 /// </summary>
 /// <param name="item">The item to remove</param>
 public virtual void RemoveItem(OrderItem item)
 {
     this.items.Remove(item);
 }
예제 #2
0
 /// <summary>
 /// Adds an item to the order
 /// </summary>
 /// <param name="quantity">The product quantity</param>
 /// <param name="price">The product price</param>
 /// <param name="product">The product being ordered</param>
 public virtual void AddItem(double quantity, decimal price, Product product)
 {
     var item = new OrderItem(this.items.Count + 1, quantity, price, product);
     this.items.Add(item);
 }