In my last post I showed you how to enable asynchronous transaction flow in .NET 4.5.1 and how you can write an enlistment which participates in the transaction scope. But something went terribly wrong. I’m sure you already spotted it. Let us have a quick look at the test execution from my previous post. The test execution time clearly shows that the red test took less than a second to process and then failed. How can that be when our simulated send operation asynchronously delays its...
Participating in TransactionScopes and Async/Await Going deep into the abyss
In my last post I showed you the TransactionScope class and how you can write your own enlistments to participate in transactions. The code we wrote was all synchronous. This time we are going deep into the abyss and change our code sample to a completely asynchronous API. Let’s explore how the code could look like:
Participating in TransactionScopes and Async/Await Introduction
I would consider this blogpost as unnecessary knowledge for most programming tasks you do during your lifetime as a developer. But if you are involved in building libraries or tools used in integration scenarios you might consider this helpful. The .NET platform has under System.Transactions a very nifty class called TransactionScope. The TransactionScope allows you to wrap your database code, your messaging code and sometimes even third-party code (if supported by the third-party library)...