.net - CQRS Matching Events and Commands -
i'm getting started cqrs , i'm finding event class definitions match command definitions 1 1. aside obvious code repetition, i'm trying figure out i'm doing wrong. there cases events don't match commands....but not many.
take simple cud scenario:
command classes:
- createpost
- updatepost
- deletepost
event classes:
- createdpost
- updatedpost
- deletedpost
any advice on this?
i'm using event store, if makes difference.
thanks.
you wouldn't use cqrs crud scenarios. there way simpler tools , patterns create crudy applications.
cqrs brings many advantages behavior-rich scenarios, verbs not create, read, update, delete, rather resemble real behavior. promoteemployee or blacklistvendor.
once start modelling behavior-rich domain, there might still many corelating commands/events - isn't bad thing -, find commands , resulting events can different both in size (data contained) , in numbers.
Comments
Post a Comment