示例#1
0
 public JoinedSubclassScenario(ISessionFactory factory)
 {
     this.factory = factory;
     using (ISession s = factory.OpenSession())
     {
         using (ITransaction t = s.BeginTransaction())
         {
             var entity = new Derived3
             {
                 ShortContent = "Short",
                 LongContent  = "LongLongLongLongLong",
             };
             s.Save(entity);
             t.Commit();
         }
     }
 }
示例#2
0
			public JoinedSubclassScenario(ISessionFactory factory)
			{
				this.factory = factory;
				using (ISession s = factory.OpenSession())
				{
					using (ITransaction t = s.BeginTransaction())
					{
						var entity = new Derived3
						{
							ShortContent = "Short",
							LongContent = "LongLongLongLongLong",
						};
						s.Save(entity);
						t.Commit();
					}
				}
			}