That is not the right way to do it because the custom transaction
management will give you some other headaches.
The best way is the implementation of NHibernate.Transaction.
ITransactionFactory and the configuration of transaction.factory_class with
your impl.
On Friday, April 6, 2012 10:07:38 AM UTC-3, kor wrote:
>
> hi all, i'm using the last nh version with firebird net provider.
>
> in a single place i need to initialize by myself the transaction to
> use becouse i need to use same firebird specific options.
>
> i tried to do that
>
> using(ISession session = ...open nh session)
> {
> var conn = session.Connection as FbConnection;
> using(DbTransaction tx = conn.BeginTransaction(//fb specifc options)
> {
> //work with nh session
> tx.Commit();
> }
> }
>
> but this doesnt work becouse there's an exception becouse the inner fb
> command generated and used by nhibernate doent have a transaction set,
> so i want kow if there's a way to set the ado.net transation that
> nhibernate will use, so samething as
>
> using(ISession session = ...open nh session)
> {
> var conn = session.Connection as FbConnection;
> using(DbTransaction tx = conn.BeginTransaction(//fb specifc options)
> {
> session.Transaction = //set tx
> //work with nh session
> tx.Commit();
> }
> }
>
> is it possible? thanks
>
--
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/nhusers/-/CyCMOp1fGwgJ.
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.