/// <summary>
 ///     Tells the bootstrapper to use PostgreSQL as a job storage,
 ///     that can be accessed using the given connection string or
 ///     its name.
 /// </summary>
 /// <param name="configuration">Configuration</param>
 /// <param name="nameOrConnectionString">Connection string or its name</param>
 public static IGlobalConfiguration <PostgreSqlStorage> UsePostgreSqlStorage(
     this IGlobalConfiguration configuration,
     string nameOrConnectionString)
 {
     DapperNodaTimeHelpers.AddDapperNodaTime();
     return(configuration.UsePostgreSqlStorage(nameOrConnectionString, null, new PostgreSqlStorageOptions()));
 }
        /// <summary>
        ///     Tells the bootstrapper to use PostgreSQL as a job storage
        ///     with the given options, that can be accessed using the specified
        ///     connection string or its name.
        /// </summary>
        /// <param name="configuration">Configuration</param>
        /// <param name="nameOrConnectionString">Connection string or its name</param>
        /// <param name="connectionSetup">Optional setup action to apply to created connections</param>
        /// <param name="options">Advanced options</param>
        public static IGlobalConfiguration <PostgreSqlStorage> UsePostgreSqlStorage(
            this IGlobalConfiguration configuration,
            string nameOrConnectionString,
            Action <NpgsqlConnection> connectionSetup,
            PostgreSqlStorageOptions options)
        {
            DapperNodaTimeHelpers.AddDapperNodaTime();

            var storage = new PostgreSqlStorage(nameOrConnectionString, connectionSetup, options);

            return(configuration.UseStorage(storage));
        }