Example #1
0
 public GroceryItemPurchase(GroceryItem gi, decimal price)
 {
     this.Name = gi.Name;
     this.Type = gi.Type;
     this.Id   = Guid.NewGuid();
     Price     = price;
 }
Example #2
0
        public void Add(GroceryItem newItem, Decimal price = 0)
        {
            GroceryItemPurchase gIP = new GroceryItemPurchase(newItem, price);

            this.GroceryList.Add(gIP);
        }