Exemple #1
0
        public static IServiceCollection AddRabbitaDbPersistentMigrator(this IServiceCollection services, [NotNull] Action <MessagingDbOptions> configure)
        {
            var options = new MessagingDbOptions();

            configure.Invoke(options);
            services.AddSingleton(options);
            services.AddSingleton <IDbMigrationService, MariaDbMigrationService>();
            return(services);
        }
 public MariaDbMigrationService(ILoggerFactory loggerFactory, [NotNull] MessagingDbOptions options)
 {
     _connectionString = options?.ConnectionString ?? throw new ArgumentNullException(nameof(options.ConnectionString));
     _loggerFactory    = loggerFactory;
 }