View Source Commanded.Aggregates.AggregateStateBuilder (Commanded v1.4.1)

Link to this section Summary

Functions

Populate the aggregate's state from a snapshot, if present, and it's events.

Load events from the event store, in batches, to rebuild the aggregate state

Link to this section Functions

Populate the aggregate's state from a snapshot, if present, and it's events.

Attempt to fetch a snapshot for the aggregate to use as its initial state. If the snapshot exists, fetch any subsequent events to rebuild its state. Otherwise start with the aggregate struct and stream all existing events for the aggregate from the event store to rebuild its state from those events.

Link to this function

rebuild_from_events(state)

View Source

Load events from the event store, in batches, to rebuild the aggregate state