Repository
Business Repository Interface
Special type of Business Interface
is Repository
.
If you want to fetch or store Aggregate register under Ecotone's Repository you may use #[Repository]
attribute.
For State-Stored Aggregate
Ecotone will read type hint to understand, which Aggregate you would like to fetch or save.
Implementation will be delivered by Framework. All you need to do is to define the interface and it will available in your Dependency Container
For Event Sourced Aggregate
The difference is in save
method, you need to provide aggregate id, current aggregate's version and array of events
you would like to store.
Last updated