Skip to content

Support for automatically append events from aggregates #369

@tim-cools

Description

@tim-cools

When event sourcing is implemented, the appended events are often stored in a collection in a base Aggregate class. This is explained in this blog post: https://lostechies.com/jimmybogard/2014/05/13/a-better-domain-events-pattern/

Example: https://github.com/yreynhout/AggregateSource/blob/master/src/Core/AggregateSource.Content.ExplicitRouting/AggregateRootEntity.cs

This enables that the events can be appended to the store before a transactions is completed.
( See SaveChanged https://lostechies.com/jimmybogard/2014/05/13/a-better-domain-events-pattern/ )

This is difficult in the case of aggregates because the Marten session does not contain the aggregates. Is this something we can support too? We might hold the aggregates in a separated collection, so that we can enumerate them in a listener.

Or do you have something else in in mind to append events to the session in an automatic way?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions