private ISessionFactory InitializeSessionFactory() { var nhConfiguration = new NhBootStrapper { ConfigurationFileName = Translate(ConfigurationFileName) }; return(nhConfiguration.NhConfiguration.BuildSessionFactory()); }
public void ConfigureStore() { var nhBootStrapper = new NhBootStrapper { ConfigurationFileName = _configurationName }; nhBootStrapper.eDirectorySchemaExport.Create(false, true); }
static void Main(string[] args) { var nhBootStrapper = new NhBootStrapper { ConfigurationFileName = @"nhibernate.ce.console.cfg.xml" }; var connString = nhBootStrapper.NhConfiguration.GetProperty("connection.connection_string"); System.Console.WriteLine("Updating database schema for: " + connString); nhBootStrapper.eDirectorySchemaExport.Create(true, true); }
private static void InitialiseDatabase() { var nHFactory = GlobalContext.Instance().TransFactory as TransManagerFactoryNh; if (nHFactory == null) { return; } var nhBootStrapper = new NhBootStrapper { ConfigurationFileName = nHFactory.ConfigurationFileName }; nhBootStrapper.eDirectorySchemaExport.Create(false, true); }
private static void InitialiseDatabase() { var nHFactory = GlobalContext.Instance().TransFactory as TransManagerFactoryNh; if (nHFactory == null) { return; } var nhBootStrapper = new NhBootStrapper { ConnectionString = ApplicationSettingsFactory.ConnectionString }; bool CreateDatabase = bool.Parse(ApplicationSettingsFactory.CreateDB); if (CreateDatabase) { nhBootStrapper.CamsSchemaExport(); } }