コード例 #1
0
ファイル: Program.cs プロジェクト: phospher/SchoolEndORM
 static void Main( string[] args )
 {
     SessionFactory sessionFactory = new SessionFactory ();
     ISession session;
     sessionFactory.Initialize ( @"E:\毕业设计\ORMFramework\ORMFramework.Examples\Config.xml" );
     session = sessionFactory.CreateSession ();
     TestInsert ( session );
     Console.ReadKey ();
     TestUpdate ( session );
     Console.ReadKey ();
     TestDelete ( session );
     Console.ReadKey ();
     TestOneToMany ( session );
     Console.ReadKey ();
     TestManyToOne ( session );
     Console.ReadKey ();
     TestOneToOne ( session );
     Console.ReadKey ();
     TestManyToMany ( session );
     Console.ReadKey ();
     TestMultitransaction ( sessionFactory );
     Console.ReadKey ();
 }
コード例 #2
0
ファイル: Program.cs プロジェクト: phospher/SchoolEndORM
 private static void TestMultitransaction( SessionFactory sessionFactory )
 {
     Thread transaction1 = new Thread ( new ParameterizedThreadStart ( Transaction1 ) );
     transaction1.Start ( sessionFactory );
 }