-
Notifications
You must be signed in to change notification settings - Fork 96
Open
Description
Hi,
thank you for this great starter repository and for the series of blog articles! I'm still finding my way how to best structure a DDD/CQRS project and your content is really helpful for that.
I was hoping you could help me understand the place and use of the MediatR code and Specification code better.
- I am wondering why the MediatR code (models, queries, commands) is part of the Web API project and not of the Core (domain model) project and the Infrastructure?
E.g. this blog puts the MediatR Commands & Queries in the Domain project, and the IRequestHandler implementations in the Services (infrastructure) project:
https://medium.com/@ducmeit/net-core-using-cqrs-pattern-with-mediatr-part-1-55557e90931b
https://medium.com/@ducmeit/net-core-using-cqrs-pattern-with-mediatr-part-2-cc55763e83f0
https://github.com/ducmeit1/cqrswithmediatr
You put the Specifications in the Core (domain model) project; this seems similar to how the blog I linked above puts Queries in its Domain project.
- shouldn't the
CosmosDbSpecificationEvaluatorbe in theInfrastructureproject then, given that that is likely going to be a specific implementation? - I see MediatR being used in the Web API project, and Specifications being used in the Functions project. Can you please explain something about when you choose to use MediatR, and when you choose to use
Specifications?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels