C# tranactions

We are currently using RavenDB as our event store. I’ve been evaluating converting over to Event Store. One thing I like about RavenDB is that it will run inside a C# Transaction. Does event store have the same capability?

You can do it but I wouldn't if you are writing events and using two
phase commit you are probably #doingitwrong

The reason we are doing it is because we are also updating our sql server read store at the same time so I want to be able to roll back any changes to both DBs.

Why?

To keep them in sync. I realize there are other method for doing this but for now that’s the way we are doing it.

You can do it (see start transaction/end transaction on client API)
but I would recommend against it. For most circumstances its better to
be async and work around the issue (you can still give appearance of
being totally consistent including read your write assurances which is
normally what people want)

Thanks for your quick reply!

Just to follow up. Is what you are suggesting is to update the event store and then call an async method or even drop the event on a bus and then have some king of mechanism to resolve the problem if the read store fails?

put it into the db then later read it out and publish it if you so
choose. Any event store is also a queue, does it matter if you queue
then queue a message?

Thanks. That makes a lot of sense.