Persistence and Domain Events with persistence ignorant objects
问题 I've been studying on domain driven design in conjunction with domain events. I really like the separations of concerns those events provide. I ran into an issue with the order of persisting a domain object and raising domain events. I would like to raise events in the domain objects, yet I want them to be persistence ignorant. I've created a basic ShoppingCartService , with this Checkout method: public void Checkout(IEnumerable<ShoppingCartItem> cart, Customer customer) { var order = new