transactionscope - NHibernate transaction: Why does this result in committed data? -
The following code displays a misleading state in which the data is committed to the database, even if it never calls on less transactions
Can anyone be explained?
[TestFixture] Public class testfactext {[test] Public Zero Test () {var config = DoConfiguration (); (Var factory = config.BuildSessionFactory ()) ({var session = factory.OpenSession ()) {CallSessionContext.Bind (session); (New TransactionEdit ()) using {session.BeginTransaction ()) {var myEntity = session. Cutte ("From My Entity"). List & lt; MyEntity & gt; () [0]; MyEntity.Name = "test name"; } Var myEntity2 = session. Cutte ("From My Entity"). List & lt; MyEntity & gt; () [0]; MyEntity2.Name = "test name"; Session.Flush (); } CallstationTontex. Uniband (factory); }}}}}
explicitly calling
Comments
Post a Comment