Session.BeginTransaction()返回的实例等于Session.Transaction?

时间:2012-09-15 02:31:30

标签: nhibernate

我对NHibernate上的事务有疑问。据我所知,有两种方法可以从ITransaction检索ISession

选项1

ISession.BeginTransaction();

选项2

ISession.Transaction;

如果我像这样连续执行它们

ITransaction trans = session.BeginTransaction();
ITransaction trans2 = session.Transaction;

trans是否等于trans2

0 个答案:

没有答案