Skip to content

Ability to publish multiple commands #658

Description

@ADringer

Hi,

Is it possible to publish multiple commands to the CommandBus, or wrap the CommandBus up in some sort of transaction?

Reason
Say I have a User aggregate and I've modeled the domain nicely and have certain commands such as UpdateName(), AddAddress(), UpdateDob() etc.

However, the UI implementation of this has put all of those fields on a single form and just does a single PUT with all the data to my api. I would like my API layer to handle what commands should be called based on the user input and raise the publish the commands accordingly. I would like to keep the domain as it is (based on the domain, not the UI implementation).

Say I publish 3 commands but the third one fails (could be business logic etc) then I don't want any of the events to be saved. How can I publish multiple commands but only save the events etc when all of them are completed?

Thanks

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions