Passed stream headers to aggregate factory #25

Open
wants to merge 1 commit into
from

2 participants

@aleksandrov

I propose to change interface IConstructAggregates to pass to factory stream headers.

That's convenient - load aggregate by interface (for example IOwner), but stored events were generated by interface implementation (and stream header AggregateType points to concrete implementation of interface IOwner).

If my explanation is unclear, I'll provide more detailed example.

Regards,
Dmitry

@gaevoy

+1 Helpful feature to load aggregate by some interface.

var entity = repo.GetById<IAggregateCloneable>(cmd.Id);
var clone = entity.Clone(cmd.CloneId);
repo.Save(clone);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment