Cpt*_*low 1 domain-driven-design cqrs nservicebus-sagas
我正在使用 DDD 设计 CQRS 应用程序,并且想知道如何实现以下场景:
Participant聚合可以被多个引用ParticipantEntry聚合AddParticipantInfoCommand发送到 Command 端,其中包含Participantand one 的所有信息ParticipantEntry(类似于 an Orderand one OrderLineItem)应该在哪里实现检查 Participant 是否已经存在的逻辑,如果它不存在,则创建 Participant?
Participant,如果没有找到,则发出AddParticipantCommand一个AddParticipantEntry命令,然后发出包含Participant ID?您不一定需要传奇来处理这种情况。看看我的博客文章,了解为什么不创建聚合根,以及该怎么做:
http://udidahan.com/2009/06/29/dont-create-aggregate-roots/