c# - Multiple NHibernate Transactions in TransactionScope -
i have legacy dll uses multiple nhibernate transactions in 1 method. task make method act 1 transaction, think transactionscope should me. however, when made this:
using (transactionscope tx = new transactionscope()) { #region.. code inside dll using (isession session1 = ...) using (itransaction tx1 = session.begintransaction()) { // ...do work session tx1.commit(); } using (isession session2 = ...) using (itransaction tx2 = session.begintransaction()) { // ...do work session tx2.commit(); } #endregion tx.complete(); }
...method not rolledback if tx2 falls!
i appreciate suggestion or hint..
thank in advance
Comments
Post a Comment