Esempio n. 1
0
 private static ISessionFactory SessionFactory(string connectionString)
 {
     if (connections[connectionString] == null)
     {
         connections[connectionString] = NHibernateFunctions.NHibernateConfiguration(connectionString, false).BuildSessionFactory();
     }
     return((ISessionFactory)connections[connectionString]);
 }
Esempio n. 2
0
        public static void UpdateDbSchema()
        {
            var session = NHibernateFunctions.NHibernateConfiguration(Properties.Settings.Default.ConnectionString, true).BuildSessionFactory().OpenSession();

            session.Close();
        }