pjvds / ncqrs

Ncqrs Framework - The CQRS Framework for .NET
Other
539 stars 164 forks source link

Feature 66 use existing or create new executor #50

Closed bradtwurst closed 13 years ago

bradtwurst commented 13 years ago

includes some unit tests - feel free to critique

bradtwurst commented 13 years ago

The situation I encountered was that the root could receive the command at two different times, either when the root had not yet been created and when the root was already created.

The current implementation required me to make an explicit choice as to whether a command creates or updates a root. Usually, this isn't a problem, but in this one situation, I didn't have that explicitness available to me.

This change allows a command to use an existing root (if one exists) and calls the identified method on the root, or otherwise create a new root and calls the corresponding constructor.

Do you need more info than this?

jasondentler commented 13 years ago

Thanks! Your pull request didn't break the build (assuming no other commits have been merged).

This is an automated message from GitHub Builder.

pjvds commented 13 years ago

Thx James!