public void Setup()
 {
     var bte1 = new BasicTestEntity3 { Str1 = "x", Str2 = "y" };
     using (var tx = Session.BeginTransaction())
     {
         id1 = (int)Session.Save(bte1);
         tx.Commit();
     }
     using (var tx = Session.BeginTransaction())
     {
         bte1.Str1 = "a";
         bte1.Str2 = "b";
         tx.Commit();
     }
 }
Esempio n. 2
0
        public void Setup()
        {
            var bte1 = new BasicTestEntity3 {
                Str1 = "x", Str2 = "y"
            };

            using (var tx = Session.BeginTransaction())
            {
                id1 = (int)Session.Save(bte1);
                tx.Commit();
            }
            using (var tx = Session.BeginTransaction())
            {
                bte1.Str1 = "a";
                bte1.Str2 = "b";
                tx.Commit();
            }
        }