Exemple #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
     }));
 }
Exemple #2
0
 public void ExportSchemaScript(string connectionString, string filePath)
 {
     NHConfigurator.SchemaScriptExport(GetProviderConfigurer(connectionString), MappingsAssembly, filePath, false);
 }
Exemple #3
0
 public void UpdateSchema(string connectionString)
 {
     NHConfigurator.SchemaUpdate(GetProviderConfigurer(connectionString), MappingsAssembly);
 }