public EFCoreAutoMigrator(DbContext _dbContext, ILogger _logger)
        {
            dbMigratorProps = new DBMigratorProps()
            {
                dbContext = _dbContext,
                logger    = _logger,
                dbMigratorTableMetatdata = new DefaultMigrationMetadata(),
                migrationProviderFactory = new MigrationProviderFactory(),
                allowDestructive         = false,
                snapshotHistoryLimit     = -1
            };
            var migrationAssembly             = _dbContext.GetService <IMigrationsAssembly>();
            DesignTimeServicesBuilder builder = new DesignTimeServicesBuilder(migrationAssembly.Assembly, Assembly.GetEntryAssembly(), this, null);
            var dbServices = builder.Build(_dbContext);

            var dependencies  = dbServices.GetRequiredService <MigrationsScaffolderDependencies>();
            var migrationName = dependencies.MigrationsIdGenerator.GenerateId(Utilities.DalConsts.MIGRATION_NAME_PREFIX);

            dbMigratorProps.dbServices    = dbServices;
            dbMigratorProps.migrationName = migrationName;
        }
 public MigrationScriptExecutor(DBMigratorProps _dBMigratorProps)
 {
     dBMigratorProps = _dBMigratorProps;
     contextMigrator = dBMigratorProps.migrationProviderFactory.Build(_dBMigratorProps, this);
 }