Multiple Aggregates / Repositories in one Transaction?

I think what you really meant to ask was regarding ' Multiple Aggregates in one transaction '. I don't believe there is anything wrong with using multiple repositories to fetch data in a transaction . Often during a transaction an aggregate will need information from other aggregates in order to make a decision on whether to, or how to, change state.

That's fine. It is, however, the modifying of state on multiple aggregates within one transaction that is deemed undesirable, and I think this what your referenced quote was trying to imply.

There's nothing wrong with using two repositories in one transaction. As JB Nizet points out, that's what a service layer is for.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions