public MsSqlStorageProvider(JobbrMsSqlConfiguration configuration) { this.connectionFactory = new OrmLiteConnectionFactory(configuration.ConnectionString, configuration.DialectProvider); if (configuration.CreateTablesIfNotExists) { this.CreateTables(); } }
public static void AddMsSqlStorage(this IJobbrBuilder builder, Action <JobbrMsSqlConfiguration> config) { var msSqlConfiguration = new JobbrMsSqlConfiguration(); config(msSqlConfiguration); builder.Add <JobbrMsSqlConfiguration>(msSqlConfiguration); builder.Register <IJobStorageProvider>(typeof(MsSqlStorageProvider)); builder.Register <IConfigurationValidator>(typeof(JobbrMsSqlConfigurationValidator)); }
public MsSqlStorageProvider(JobbrMsSqlConfiguration configuration) { this.connectionFactory = new OrmLiteConnectionFactory(configuration.ConnectionString, configuration.DialectProvider); if (configuration.CreateTablesIfNotExists) { this.CreateTables(); } if (configuration.Retention.HasValue) { this.retentionEnforcer = new RetentionEnforcer(this, configuration.Retention.Value, configuration.RetentionEnforcementInterval); } }