O'Reilly logo

Essential Windows Workflow Foundation by Bob Schmidt, Dharma Shukla

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

6. Transactions

WF aligns with the programming model for transactions that is provided by the System.Transactions namespace in the .NET Framework. There is plenty of documentation and additional explanatory material that has been written about this API—and we encourage you to familiarize yourself with the specifics—but the bottom line is that System.Transactions presents a simplified model for using transactions such that the nuts and bolts of managing a transaction (e.g., the selection of transaction managers, enlistment of resources, and transaction promotion) are, unless you need to get to them, agreeably out of sight.

Thus in C#, you just write the following:

using (TransactionScope ts = new TransactionScope()){  // use transactional resources… ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required