Can anyone give me a quick overview of using TransactionScope with NHibernate? Do I need to do anything special with the session/IEnlistmentNotification/etc. to get this to work? Are there any pitfalls that I should worry about? For example, can I replace all of my hibernate transactions:
var transaction = session.BeginTransaction();
try
{
// code
transaction.Commit();
}
catch (Exception)
{
transaction.Rollback();
}
with this?:
using (var scope = new TransactionScope())
{
// code
scope.Complete();
}