public void ReturnPurchaseItems() { var returnedItems = PurchasedItems.ToList(); PurchasedItems.Clear(); DomainEvents.Raise(new ReturnedItemsEvent(DateTime.Now, returnedItems.ToArray())); }
public void UpdatePurchaseItems(IEnumerable <PurchaseItem> purchasedItems) { var returnedItems = PurchasedItems.ToList(); DomainEvents.Raise(new ReturnedItemsEvent(DateTime.Now, returnedItems.ToArray())); PurchasedItems.Clear(); PurchasedItems.AddRange(purchasedItems); DomainEvents.Raise(new PurchasedItemsEvent(DateTime.Now, purchasedItems.ToArray())); Modified = DateTime.Now; }