private static void Main(string[] args) { var helper = new NHibernateHelper(); var export = new SchemaExport(helper.Configuration); export.Create(true, false); return; ISession session = helper.GetSession(); //Class c = null; //var tran = session.BeginTransaction(); //try //{ // TestInsertData2(session,ref c); // session.Flush(); // tran.Commit(); //} //catch (Exception ex) //{ // tran.Rollback(); // session.Clear(); // Console.WriteLine(ex.Message); //} ITransaction tran2 = session.BeginTransaction(); try { TestInsertData(session); tran2.Commit(); } catch (Exception ex) { tran2.Rollback(); Console.WriteLine(ex.Message); } session.Close(); }
public BaseTest() { helper = new NHibernateHelper(); }
private void ShowCreateDbSql() { var helper = new NHibernateHelper(); var export = new SchemaExport(helper.Configuration); export.Create(true,false); }