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