Reliable integration with other systems is a common business requirement. When these systems report error conditions, it's necessary to roll back not only the local database work, but perhaps the work of multiple transactional resources. In this recipe, I'll show you how to use Microsoft's TransactionScope and NHibernate to achieve this goal.
Create a new console application project.
Add references to the
Eg.Core project in Chapter 1,
Get the console application ready by following the Configuring NHibernate with App.config and Configuring log4net recipes in Chapter 2.