m-r
m-r copied to clipboard
Simple CQRS example
I'm wondering how to implement business rule depends on entity current state. For example: "You can change the name of the InventoryItem only if new name is longer".
It loos like the `AggregateRoot` `Version` field is never updated. It should probably be updated at the end of the `LoadsFromHistory` method (which should probably be renamed `LoadFromHistory`), with the...
This makes Event a mutable type. ``` public class Event : Message { public int Version; } ``` I think Commands and Events should be immutable instead.
Hi @gregoryyoung , could you please explain what is the intended semantic of the Version property in the Event class ? Is it meant to be the version of the...
We keep getting this questions from people who use message buses to build read models, it is the FAQ question, but it is still here https://github.com/gregoryyoung/m-r/blob/master/CQRSGui/Global.asax.cs#L45 Be May it is...
Even though I know this should be seen as a demonstration for learning CQRS and is just the most simplest implementation... I have seen people jump onto this horse and...
In case anyone's wondering, there are races between event handlers and the read model facade after commands are issued. This is due to the use of `ThreadPool.QueueUserWorkItem` in `FakeBus.Publish`. You...
It would be helpful to explicitly know what the license is for this repository. For instance - can I fork and refactor for training purposes?
https://github.com/gregoryyoung/m-r/issues/13#issuecomment-165428366 The changes are not significant insofar as _how_ the event gets pushed to the view models, but the concept of a 'Publish(event)' has been removed (including the implementation), so...
The version of the AggregateRoot gets incremented whenever a new event is applied. Also there was a missing cleanup after saving the events to the store.