Wednesday, January 30, 2019

Help Wanted DDD (Domain Drive Design)

Im building a API that will provide some information about soccer games like position of each time on the table, goals for etc.

I have a Aggregate that contais the entity club(clubId, name, ICollection ClubResults), ClubResult is a value object.

Club Entity :

public int timeId { get; private set; }public string Name { get; private set; }public int league { get; private set; }public ICollection<ClubResult> ClubResults { get; set; }

//Public Methods ...

ClubResult :

public int season{ get; private set; }public int position{ get; private set; }public int points{ get; private set; }public int played{ get; private set; }

//Other Properties ...

Im with a doubt about the property league in Club entity, i dont know if it shoud be a other Aggregate, the league is a division os soccer clubs, example : Division a, b, c ....

Could Some one help me with that doubt ? Could i create a Aggregate to the league ? if i create a aggregate to the league could i share the league aggregate with the club aggregate ? If i can't how could i ensure that a league exist when i create a new club or update a info of club ?

Thx.

Help Wanted DDD (Domain Drive Design) Click here
  • Blogger Comment
  • Facebook Comment

0 comments:

Post a Comment

The webdev Team