public IDictionary <string, string> GetProperties() { if (Provider.IsEmpty()) { throw new ApplicationException("DatabaseSettings unavailable. Make sure your application configuration file has appSetting entries for the necessary DatabaseSettings properties."); } var properties = new Dictionary <string, string> { { "connection.provider", Provider }, { "connection.driver_class", Driver }, { "dialect", Dialect }, { "use_outer_join", UseOuterJoin.ToString().ToLowerInvariant() }, { "connection.connection_string", ConnectionString }, { "show_sql", ShowSql.ToString().ToLowerInvariant() }, { "proxyfactory.factory_class", ProxyFactory } }; if (IsCacheEnabled()) { properties.Add("cache.provider_class", CacheProvider); properties.Add("cache.use_second_level_cache", "true"); properties.Add("cache.use_query_cache", "true"); } if (GenerateStatistics) { properties.Add("generate_statistics", "true"); } return(properties); }
public IDictionary <string, string> GetProperties() { var properties = new Dictionary <string, string> { { "connection.provider", Provider }, { "connection.driver_class", Driver }, { "dialect", Dialect }, { "use_outer_join", UseOuterJoin.ToString() }, { "connection.connection_string", ConnectionString }, { "show_sql", ShowSql.ToString() }, }; return(properties); }