What is the semantic of the Version property in the Event class ?
EnricoMassone opened this issue · 0 comments
Hi @gregoryyoung ,
could you please explain what is the intended semantic of the Version property in the Event class ?
Is it meant to be the version of the aggregate at the time the event was raised or the version of the aggregate obtained after the event is applied to the aggregate ?
Here is an example to summarize my doubt.
Let's imagine of having an aggregate currently at version 5 materialized from the event store. Then, we issue a command to the aggregate and an event is raised so that, after applying the event to the aggregate state, the new aggregate version is 6.
In such a scenario, do you expect @event.Version = 5 or @event.Version = 6 ? Based on my understanding, it should be @event.Version = 6. Is it correct ?
Thanks for the clarification.
Enrico