When we use TransactionScope with NHibernate we have 2 problems: 1. Connection to db is not released between transactions (between unit tests). 2. QueryOver do not see changes made before invoking it.
Full description is in ReadMe file in attached project. In this attachment we provide unit tests to reproduce those problems.
Environment
Windows 7
.NET Framework 4.5
Visual Studio .NET 2012
What I know is that in this scenario NH is not connected to the transaction from TransactionScope. And the workaround solves this problem. I don't know NH source code so I can't say where the problem is.
Maximilian Haru Raditya November 15, 2013 at 2:50 PM
So given your workaround, does it mean that in current NH code base such transaction enlistment isn't correctly done?
When we use TransactionScope with NHibernate we have 2 problems:
1. Connection to db is not released between transactions (between unit tests).
2. QueryOver do not see changes made before invoking it.
Full description is in ReadMe file in attached project. In this attachment we provide unit tests to reproduce those problems.