public void Save(DataMigrationScripts dataMigrationScripts)
        {
            var stopwatch = Stopwatch.StartNew();

            JsonUtility.SerializeToFile(dataMigrationScripts, _dataMigrationScriptsFilePath, Formatting.Indented);
            _performanceLogger.Write(stopwatch, $"Saved {dataMigrationScripts.Scripts.Count} scripts to generated file.");
        }
Ejemplo n.º 2
0
 public DataMigrationScriptsExecuter(ISqlExecuter sqlExecuter, ILogProvider logProvider, DataMigrationScripts dataMigrationScripts,
                                     DbUpdateOptions dbUpdateOptions, SqlTransactionBatches sqlTransactionBatches)
 {
     _sqlExecuter           = sqlExecuter;
     _logger                = logProvider.GetLogger("DataMigration");
     _dataMigrationScripts  = dataMigrationScripts;
     _sqlTransactionBatches = sqlTransactionBatches;
     _dbUpdateOptions       = dbUpdateOptions;
 }
Ejemplo n.º 3
0
 public ApplicationGenerator(
     ILogProvider logProvider,
     ISqlExecuter sqlExecuter,
     IDslModel dslModel,
     IDomainObjectModel domGenerator,
     IPluginsContainer <IGenerator> generatorsContainer,
     DatabaseCleaner databaseCleaner,
     DataMigrationScripts dataMigration,
     IDatabaseGenerator databaseGenerator,
     IDslScriptsProvider dslScriptsLoader,
     IConceptDataMigrationExecuter dataMigrationFromCodeExecuter)
 {
     _deployPackagesLogger          = logProvider.GetLogger("DeployPackages");
     _performanceLogger             = logProvider.GetLogger("Performance");
     _sqlExecuter                   = sqlExecuter;
     _dslModel                      = dslModel;
     _domGenerator                  = domGenerator;
     _generatorsContainer           = generatorsContainer;
     _databaseCleaner               = databaseCleaner;
     _dataMigration                 = dataMigration;
     _databaseGenerator             = databaseGenerator;
     _dslScriptsLoader              = dslScriptsLoader;
     _dataMigrationFromCodeExecuter = dataMigrationFromCodeExecuter;
 }