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 (); }
private static void TestMultitransaction( SessionFactory sessionFactory ) { Thread transaction1 = new Thread ( new ParameterizedThreadStart ( Transaction1 ) ); transaction1.Start ( sessionFactory ); }