Events
An event is something significant that has happened in the domain. It encapsulates all relevant data of the action that happened.
You can/should/must...
an event must be immutable
an event must represent a domain event that already happened with a name in the past tense
an event can be dispatched only by one aggregate
To create an event with Cronus, just use the IEvent
markup interface.
Cronus uses the ToString()
method for logging, so you can override it to generate user-readable logs. Otherwise, the name of the event class will be used for log messages.
Last updated
Was this helpful?