Exemplo n.º 1
0
		public void NoExceptionMustBeThrown2()
		{
			using (ISession s = OpenSession())
			{
				using (ITransaction tx = s.BeginTransaction())
				{
					FooAssigned f = new FooAssigned();
					f.Description = "f1";
					f.Id = 1;
					s.Save(f);
					tx.Commit();
				}

				using (ITransaction tx = s.BeginTransaction())
				{
					FooAssigned f = new FooAssigned();
					f.Description = "f2";
					f.Id = 1;
					s.Save(f);
					tx.Commit();
				}
			}
		}
Exemplo n.º 2
0
        public void NoExceptionMustBeThrown2()
        {
            using (ISession s = OpenSession())
            {
                using (ITransaction tx = s.BeginTransaction())
                {
                    FooAssigned f = new FooAssigned();
                    f.Description = "f1";
                    f.Id          = 1;
                    s.Save(f);
                    tx.Commit();
                }

                using (ITransaction tx = s.BeginTransaction())
                {
                    FooAssigned f = new FooAssigned();
                    f.Description = "f2";
                    f.Id          = 1;
                    s.Save(f);
                    tx.Commit();
                }
            }
        }