What are the DomainEvents in the TodoItem #426
Replies: 1 comment 4 replies
-
Hi, An event is something that has happened in the past. A domain event is, something that happened in the domain that you want other parts of the same domain (in-process) to be aware of. The notified parts usually react somehow to the events. An important benefit of domain events is that side effects can be expressed explicitly. For example, if you're just using Entity Framework and there has to be a reaction to some event, you would probably code whatever you need close to what triggers the event. So the rule gets coupled, implicitly, to the code, and you have to look into the code to, hopefully, realize the rule is implemented there. On the other hand, using domain events makes the concept explicit, because there is a DomainEvent and at least one DomainEventHandler involved. You can find more information here: |
Beta Was this translation helpful? Give feedback.
-
I'm assuming it's for some sort of record keeping? I've looked through the code and can't find where the DomainEvents for the ToDoItem do anything.
Can someone explain what these are for to me?
Beta Was this translation helpful? Give feedback.
All reactions