Hi was looking trough the examples and saw stated the folowing. and i wondered why it is that way :
|
if err := p.repo.Save(ctx, g); err != nil { |
in here (guestlist projector ) we pass on the repo, and do the saving within the projector
in the invitation projector itself. we return the model, and do the saving outside the projecter.
why are these handled differently? and what are the determing factors to use either one.
Hi was looking trough the examples and saw stated the folowing. and i wondered why it is that way :
eventhorizon/examples/guestlist/domains/guestlist/projectors.go
Line 184 in 68284b6
in here (guestlist projector ) we pass on the repo, and do the saving within the projector
eventhorizon/examples/guestlist/domains/guestlist/projectors.go
Line 99 in 68284b6
in the invitation projector itself. we return the model, and do the saving outside the projecter.
why are these handled differently? and what are the determing factors to use either one.