I believe you need to start the transaction before you open the
session. this is how I use TransactionScope, and have not had a
problem with it.
//begining of UOW boundary
var tx = new TransactionScope();
MappedSessionContext.Bind(oraclefactory, oraclefactory.OpenSession());
MappedSessionContext.Bind(mssqlfactory, mssqlfactory.OpenSession());
//end of UOW boundary
if(no error occured)
{
tx.Commit();
}
MappedSessionContext.Unbind(oraclefactory).Dispose();
MappedSessionContext.Unbind(mssqlfactory).Dispose();
tx.Dispose();
On Nov 12, 9:41 am, kor <[email protected]> wrote:
> i don't understand, are u creating the nhibernate transactions
> externally of this code (for example at the boundary of the method
> that calls it) or are you using implicit transaction?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---