Skip to content
Discussion options

You must be logged in to vote

Thanks @KyleMcMaster.
My conclusion is that domain service is the way to go.
The events/mediatr alternatives feels like sneaking in dependencies. I also agree about the argument of violating the Explicit Dependencies Principle.

What is weird in the examples is that there is a product and a catalog and that the catalog is marked as an aggregate while it's only a collection of products. An aggregate should have an id and catalog does not have an id. So catalog is not an entity at all.
I do think it makes sense to distinguish the entity and the collection. The entity should encapsulate the rules of the entity. Entity does not have dependencies. The collection will be used in the domain servi…

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@renetitulaer
Comment options

@renetitulaer
Comment options

@KyleMcMaster
Comment options

@renetitulaer
Comment options

Answer selected by renetitulaer
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