In this case, the second ADO command is committed to the database,
whilst the first is rolled back. What is going on? This seems very
weird to me.

This is kind of a follow up question to my previous post here:
http://groups.google.com/group/nhusers/browse_thread/thread/241cc04309744321


    [TestFixture]
    public class TestFixture
    {
            [Test]
            public void Test()
            {
                using(var factory = _config.BuildSessionFactory())
                {
                    using (var session = factory.OpenSession())
                    {
                        CallSessionContext.Bind(session);

                        using(new TransactionScope())
                        {
                            using (session.BeginTransaction())
                            {
                                 // Do something with an NHibernate
mapped entity
                            }

                            using(var connection = new SqlConnection
(_connectionString))
                            {
                                 // Execute an insert statement
                            }
                        }

                        CallSessionContext.Unbind(factory);
                    }
                }
            }
    }
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to nhusers@googlegroups.com
To unsubscribe from this group, send email to 
nhusers+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to