Get ResolvedEvent after a write

I’d like to get information about an event after I’ve written to the the event store. Specifically I want to know the sequence number and the timestamp of the written event. It looks like AppendToStream doesn’t return anything, but one would think that it could return a ResolvedEvent. Is there any way of getting the sequence number of an event after writing?

Hi Mitchell,

Not sure which version you’re using, but AppendToStreamAsync now returns a WriteResult:

https://github.com/EventStore/EventStore/blob/dev/src/EventStore/EventStore.ClientAPI/IEventStoreConnection.cs#L78

This should be able to give you what you need:

https://github.com/EventStore/EventStore/blob/dev/src/EventStore/EventStore.ClientAPI/WriteResult.cs

Cheers,

James

That’s it! Thanks. It appears this is not in version 2.0.2 of the client api, which is what the Nuget package is right now.

Include prerelease and it’s there.

Cheers,

James