I am trying to implement CQRS model in some portion of my application, rest is handled in CRUD style. On write side when I post a command in the command handler I will load aggregate and generate necessary events and store them in EventStore and will publish those events for creating/updating read-models. And my questions are
- In command handler can I load CRUD handled entity/model while handling command for generating any events/validating the request?
- Here EventStore means it can be in memory event-queue/any sort of DB, right?
- Can I post events from related aggregates from command handlers?
- While generating read-models can I regenerate aggregate from past events along with current event?
Aucun commentaire:
Enregistrer un commentaire