ClientAPI.NetCore icon indicating copy to clipboard operation
ClientAPI.NetCore copied to clipboard

Fix ExpectedVersion

Open prolic opened this issue 7 years ago • 3 comments
trafficstars

EmptyStream is 0, add missing Invalid

prolic avatar Jul 08 '18 14:07 prolic

Isn´t the stream version zero based? Why change -1 to 0?

Narvalex avatar Jul 09 '18 14:07 Narvalex

@Narvalex Thanks for your question. You can see the comment here: https://github.com/EventStore/ClientAPI.NetCore/blob/master/src/EventStore.ClientAPI.NetCore/ExpectedVersion.cs#L13 which obviously claims something different then the code, and second, you can check the server implementation here: https://github.com/EventStore/EventStore/blob/master/src/EventStore.Core/Data/ExpectedVersion.cs On the other hand, at the server side this value is commented out, see https://github.com/EventStore/EventStore/blob/master/src/EventStore.Core/Data/ExpectedVersion.cs#L7.

prolic avatar Jul 09 '18 14:07 prolic

You are right, @prolic ! thanks for your kind response. I didn't see that the NoStream constant (-1) is still there. I was worry it will break my event sourcing framework library.

Narvalex avatar Jul 09 '18 17:07 Narvalex