private SQLiteConfiguration GetSqlLiteConfiguration()
        {
            SQLiteConfiguration config =
                SQLiteConfiguration.Standard
                .ConnectionString(_connectionString)
                .DefaultSchema(_nhibernateSchema);

            if (_showSql)
            {
                config.ShowSql();
            }
            return(config);
        }
        private SQLiteConfiguration GetSqlLiteConfiguration(NhibernateSettings nhibernateSettings)
        {
            SQLiteConfiguration config =
                SQLiteConfiguration.Standard
                .ConnectionString(nhibernateSettings.ConnectionString)
                .DefaultSchema(nhibernateSettings.DBSchema);

            if (nhibernateSettings.ShowSQL)
            {
                config.ShowSql();
            }
            return(config);
        }
示例#3
0
        private static IPersistenceConfigurer SqlLiteConfigureDatabase(NHConfigurationSection nhConfiguration)
        {
            SQLiteConfiguration cfg = SQLiteConfiguration.Standard
                                      //.UsingFile(filePath)
                                      .ConnectionString(c => c.FromConnectionStringWithKey(nhConfiguration.ConnectionStringName))
                                      .UseOuterJoin()
                                      .DefaultSchema(nhConfiguration.DatabaseSchema);

#if DEBUG
            cfg.ShowSql();
#endif

            return(cfg);
        }