I notice that the event store repository samples in the documentation and GitHub differ over the position to start reading a stream from.
In the documentation the code in GetByID is:
var sliceStart = 1; //Ignores $StreamCreated
Whereas in GitHub the code in the same position in GetById is:
var sliceStart = 0;
So, the documentation sample ignores the first event in a stream when rehydrating an aggregate. I assume the reason is that, for example, a FlightCreated event doesn’t need to be replayed when an aggregate is being rehydrated. But it raises the question for me: what is the general practice with event sourcing and aggregates? Do people recommend raising an event that broadcasts that the aggregate has been created? Do you then ignore that event when rehydrating the aggregate?