EduardoPires / EquinoxProject

Full ASP.NET Core 6 application with DDD, CQRS and Event Sourcing concepts

Home Page:http://equinoxproject.azurewebsites.net/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

implement business rules involving multiple entities

NecroKorn opened this issue · comments

To implement domain services, do I necessarily need to execute sendCommand?

Is it possible to create a service as an orchestrator that performs a process by executing actions on more than one entity in the same domain?

This project is using CQRS concepts, that decouple the responsibilities of each intention.
You will need a domain service with a cross-aggregate scenario (eg checkoutService) when you have the entities (Product, Order, OrderDetail, Customer, Payment [and more]) in this case there's no only one entity to be responsible, so you need use a domain service to coordinate this kind of complex process.