Business Repository
Business Repository Interface
Special type of Business Interface is Repository. This Interface allows us to simply load and store our Aggregates directly. In situations when we call Command directly in our Aggregates we won't be in need to use it. However for some specific cases, where we need to load Aggregate and store it outside of Aggregate's Command Handler, this business interface becomes useful.
To make use of this Business Interface, we need our Aggregate Repository being registered.
Business Repository
Ecotone will read type hint to understand which Aggregate you would like to fetch or save.
Implementation will be delivered by Ecotone. All you need to do is to define the interface and it will available in your Dependency Container
Pure Event Sourced Repository
When using Pure Event Sourced Aggregate, instance of Aggregate does not hold recorded Events. Therefore passing aggregate instance would not contain any information about recorded events. For Pure Event Sourced Aggregates, we can use direct event passing to the repository:
Last updated