Skip to content

Define one repository per aggregate #141

Answered by Sairyss
augustolopez asked this question in Q&A
Discussion options

You must be logged in to vote

1 query is totally fine, I don't see much benefit of creating 2 repositories for this.

N entities doesn't mean you need N repositories, it's N repositories for N aggregate roots.

Order is your aggregate root, so everything that this aggregate needs can be loaded in a single repository and even a single query.

Microsoft diagram that you shared above does not conflict with that as far as I understand.

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@khaelys
Comment options

@Sairyss
Comment options

@augustolopez
Comment options

@Sairyss
Comment options

Answer selected by augustolopez
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants