Nhibernate Multiple Database in One Transaction
问题 My program access to 2 databases and do some DB works. I want to do these works in one transaction and if one of them get any error, also another one should NOT be committed. Here where I am right now, the simple code of a program. using (var transactionScope = new TransactionScope(TransactionScopeOption.Required, transactionOptions)) { using (var session1 = NHibernateHelper.OpenSession1()) { using (var session2 = NHibernateHelper.OpenSession2()) { using (var trnx1 = session1.BeginTransaction