Пример #1
0
        private static void RegisterLogger(IComponentContext context, PostgreSQLOptions options)
        {
            ILogger logger = null;

            if (context.TryResolve <ILogger>(out logger))
            {
                NpgsqlLogManager.IsParameterLoggingEnabled = true;
                NpgsqlLogManager.Provider = new PostgreSQLLoggingProvider(logger, options.LogLevel);
            }
            loggerRegistered = true;
        }
Пример #2
0
 public NpgSQLData(PostgreSQLOptions postgreSQLOptions)
 {
     this.postgreSQLOptions = postgreSQLOptions;
     npgsqlConnection       = new NpgsqlConnection(this.postgreSQLOptions.ConnectionString);
     npgsqlConnection.Open();
 }
Пример #3
0
 public PostgreSQLBootstrap(PostgreSQLOptions postgreSQLOptions)
 {
     this.postgreSQLOptions = postgreSQLOptions;
 }