Alexis Narvaez
Alexis Narvaez
@MZybura, a simple approach: In a rehydration method (those that updates sate by playing all past events) just assign the name of the item from a past event to a...
And of course, if a validation fails don't throw an exception. Just publish an event like "CouldNotUpdateInventoryItemName"
Its all about left folding (a high order function, similar to [aggregate](https://msdn.microsoft.com/library/bb548651%28v=vs.100%29.aspx) in C# Linq) from previous events. It is a core concept of event sourcing. You left fold, or...
It is right [here](https://github.com/gregoryyoung/m-r/blob/master/SimpleCQRS/EventStore.cs)
That's correct, @beachwalker! You are not wrong :)
We do not lose the original version number at all. 1. Aggregate is rehydrated (`version = 5`) 2. Event is applied (`version = 6`, `#uncommittedEvents = 1`) 3. Another event...
Indeed. There are a lot of ways to do it right. For instance, in my own implementation of event store I do the concurrency check in [another way](http://github.com/Narvalex/EventCentric/blob/master/src/EventCentric/EventCentric/EventSourcing/EventStore.cs)
@darbio : Nowadays Im using EventStore, but back in the day I was inspired by [this](https://github.com/gautema/CQRSlite/blob/master/Framework/CQRSlite/Caching/CacheRepository.cs) implementation of a pesimistic concurrency check.
I think @asiraky refers to the part where you have to guarantee that the events you are saving are also successfully published to the bus, or fail altogether. But still,...
See #269