Aggregate root & Repository dilemma
- by mateoc
I am in a big dilemma here.
I have a League, Team and Player entities. I have created a repo for the league only as a Team cannot exists without a League. At first I had bounded the players only with the team but then I realised I would have a problem with free agents so I also bounded the players to the league. Then I was wondering if a player could exists without a League or a Team and I am totally confused to that question.
So would you make a player repository or include them in the league repo?
Thanks