it wont, the TransactionScope of .net does not replace the ITransaction of
nhbiernate, completely different things.
I wrote this pseudo-code so you get the idea:
using( var tx=new TransactionScope() )
{
using(var s = sf.OpenSession())
using(var tx = s.BeginTransaction()
{
//do some work
}
using(var s = sf.OpenSession())
using(var tx = s.BeginTransaction()
{
//do some work
}
using(var connection = new OracleConnection(...))
using(var tx = connection.BeginTransaction())
{
//do some work
}
using(var connection = access file)
{
//do some work
}
tx.Complete();
}
2010/9/23 Tomasz Modelski (IDev) <[email protected]>
> I'm using NHibrnate 3.0 trunk revision 4790 (12.04.2010) with
> NH.Burrow.
>
> I manage all transactions using .Net TransactioScope, ex:
> using( var tx=new TransactionScope() )
> {
> // some work .....
> tx.Complete();
> }
>
> Does this using block on end [on tx.Dispose()] will call
> session.Flush() ?
> From my tests it look like it won't.
>
> --
> 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]<nhusers%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/nhusers?hl=en.
>
>
--
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.