Beispiel #1
0
 public static void ExecuteAuxilliaryDatabaseScripts(this Configuration configuration, ISessionFactory sf)
 {
     dynamic exposed = new ExposedObjectSimple(configuration);
     foreach (var aux in exposed.auxiliaryDatabaseObjects)
     {
         var script = ((dynamic)new ExposedObjectSimple(aux)).sqlCreateString;
         using (var s = sf.OpenStatelessSession())
         {
             s.CreateSQLQuery((string)script).ExecuteUpdate();
         }
     }
 }
        public static void ExecuteAuxilliaryDatabaseScripts(this Configuration configuration, ISessionFactory sf)
        {
            dynamic exposed = new ExposedObjectSimple(configuration);

            foreach (var aux in exposed.auxiliaryDatabaseObjects)
            {
                var script = ((dynamic) new ExposedObjectSimple(aux)).sqlCreateString;
                using (var s = sf.OpenStatelessSession())
                {
                    s.CreateSQLQuery((string)script).ExecuteUpdate();
                }
            }
        }