Hi All,
This is more of a CQRS questions but I would like to hear the answer in regards to Axon.
I have an aggregate called Organisation with a bunch of Offices as value objects. You can have two scenarios in the system:
- Add an Organisation with a Single Office in
- Add an office to an existing Organisation
In case 1, we want to create Organisation implicitly so the UI only captures Office details. We have a REST api that takes a CreateOrganisationRequest object in and creates Commands from that. What is the best way to
- Create an Organisation in the background and then Create the office. i.e Shall I break it down to 2 command CreateOrganisationCommand & AddOfficeCommand? This way I can reuse AddOfficeCommand for scenario 2.
- Have 2 different commands for the 2 scenarios.
Thanks