コード例 #1
0
 CfgSessionFactory INHPersistenceProviderConfigurator.CreateSessionFactory(string connectionString)
 {
     return(NHConfigurator.CreateSessionFactory(GetProviderConfigurer(connectionString), MappingsAssembly,
                                                cfg =>
     {
         cfg.SetProperty(global::NHibernate.Cfg.Environment.CurrentSessionContextClass, "thread_static"); // TODO: read from config
         cfg.SetProperty(global::NHibernate.Cfg.Environment.ReleaseConnections, "on_close");              // TODO: read from config
     }));
 }
コード例 #2
0
 public void ExportSchemaScript(string connectionString, string filePath)
 {
     NHConfigurator.SchemaScriptExport(GetProviderConfigurer(connectionString), MappingsAssembly, filePath, false);
 }
コード例 #3
0
 public void UpdateSchema(string connectionString)
 {
     NHConfigurator.SchemaUpdate(GetProviderConfigurer(connectionString), MappingsAssembly);
 }