public ImportEmployerUsersHandler(IBulkImportService bulkImportService, ILogger <ImportEmployerUsersHandler> logger, IEmployerUsersRepository employerUsersRepository, IPersonMapper personMapper) { _bulkImportService = bulkImportService; _logger = logger; _employerUsersRepository = employerUsersRepository; _personMapper = personMapper; }
public ImportCampaignMembersHandler(IChunkingService chunkingService, ICsvService csvService, IBulkImportService bulkImportService, ILogger <ImportCampaignMembersHandler> logger) { _chunkingService = chunkingService; _csvService = csvService; _bulkImportService = bulkImportService; _logger = logger; }
/// <summary> /// Runs database migrations with Yuniql. Use this interface to run migrations targeting non-sqlserver platforms such as PostgreSql and MySql. /// </summary> /// <param name="builder"></param> /// <param name="dataService">Implementation of <see cref="IDataService". See Yuniql.PostgreSql and Yuniql.MySql pacages./></param> /// <param name="bulkImportService">Implementation of <see cref="IBulkImportService". See Yuniql.PostgreSql and Yuniql.MySql pacages./></param> /// <param name="traceService">Your custom implementation of ITraceService interface</param> /// <param name="configuration">Desired configuration when yuniql runs. Set your workspace location, connection string, target version and other parameters.</param> /// <returns></returns> public static IWebHostBuilder UseYuniql( this IWebHostBuilder builder, IDataService dataService, IBulkImportService bulkImportService, ITraceService traceService, Configuration configuration ) { var migrationServiceFactory = new MigrationServiceFactory(traceService); var migrationService = migrationServiceFactory.Create(dataService, bulkImportService); migrationService.Initialize(configuration.ConnectionString); migrationService.Run( configuration.WorkspacePath, targetVersion: configuration.TargetVersion, autoCreateDatabase: configuration.AutoCreateDatabase, tokens: configuration.Tokens, verifyOnly: configuration.VerifyOnly, bulkSeparator: configuration.BulkSeparator, metaSchemaName: configuration.MetaSchemaName, metaTableName: configuration.MetaTableName, commandTimeout: configuration.CommandTimeout, bulkBatchSize: configuration.BulkBatchSize, appliedByTool: configuration.AppliedByTool, appliedByToolVersion: configuration.AppliedByToolVersion, environmentCode: configuration.Environment, resumeFromFailure: configuration.ContinueAfterFailure.HasValue && configuration.ContinueAfterFailure.Value ? NonTransactionalResolvingOption.ContinueAfterFailure : (NonTransactionalResolvingOption?)null, noTransaction: configuration.NoTransaction ); return(builder); }
/// <inheritdoc /> public MigrationService( ILocalVersionService localVersionService, IDataService dataService, IBulkImportService bulkImportService, IConfigurationDataService configurationDataService, ITokenReplacementService tokenReplacementService, IDirectoryService directoryService, IFileService fileService, ITraceService traceService) : base( localVersionService, dataService, bulkImportService, configurationDataService, tokenReplacementService, directoryService, fileService, traceService ) { this._localVersionService = localVersionService; this._dataService = dataService; this._bulkImportService = bulkImportService; this._tokenReplacementService = tokenReplacementService; this._directoryService = directoryService; this._fileService = fileService; this._traceService = traceService; this._configurationDataService = configurationDataService; }
/// <summary> /// Runs database migrations with Yuniql. Use this interface to run migrations targeting non-sqlserver platforms such as PostgreSql and MySql. /// </summary> /// <param name="builder"></param> /// <param name="dataService">Implementation of <see cref="IDataService". See Yuniql.PostgreSql and Yuniql.MySql pacages./></param> /// <param name="bulkImportService">Implementation of <see cref="IBulkImportService". See Yuniql.PostgreSql and Yuniql.MySql pacages./></param> /// <param name="traceService">Your custom implementation of ITraceService interface</param> /// <param name="configuration">Desired configuration when yuniql runs. Set your workspace location, connection string, target version and other parameters.</param> /// <returns></returns> public static IWebHostBuilder UseYuniql( this IWebHostBuilder builder, IDataService dataService, IBulkImportService bulkImportService, ITraceService traceService, YuniqlConfiguration configuration ) { var migrationServiceFactory = new MigrationServiceFactory(traceService); var migrationService = migrationServiceFactory.Create(dataService, bulkImportService); migrationService.Initialize(configuration.ConnectionString); migrationService.Run( configuration.WorkspacePath, configuration.TargetVersion, autoCreateDatabase: configuration.AutoCreateDatabase, tokens: configuration.Tokens, verifyOnly: configuration.VerifyOnly, bulkSeparator: configuration.BulkSeparator, metaSchemaName: configuration.MetaSchemaName, metaTableName: configuration.MetaTableName, commandTimeout: configuration.CommandTimeout, bulkBatchSize: configuration.BulkBatchSize, appliedByTool: configuration.ApplyByTool, appliedByToolVersion: configuration.ApplyByToolVersion, environmentCode: configuration.Environment); return(builder); }
/// <summary> /// Runs database migrations with Yuniql. Use this interface to run migrations targeting non-sqlserver platforms such as PostgreSql and MySql. /// </summary> /// <param name="builder"></param> /// <param name="dataService">Implementation of <see cref="IDataService". See Yuniql.PostgreSql and Yuniql.MySql pacages./></param> /// <param name="bulkImportService">Implementation of <see cref="IBulkImportService". See Yuniql.PostgreSql and Yuniql.MySql pacages./></param> /// <param name="traceService">Your custom implementation of ITraceService interface</param> /// <param name="configuration">Desired configuration when yuniql runs. Set your workspace location, connection string, target version and other parameters.</param> /// <returns></returns> public static IHostBuilder UseYuniql( this IHostBuilder builder, IDataService dataService, IBulkImportService bulkImportService, ITraceService traceService, YuniqlConfiguration configuration ) { var migrationServiceFactory = new MigrationServiceFactory(traceService); var migrationService = migrationServiceFactory.Create(dataService, bulkImportService); migrationService.Initialize(configuration.ConnectionString); migrationService.Run( configuration.WorkspacePath, configuration.TargetVersion, configuration.AutoCreateDatabase, configuration.Tokens, configuration.VerifyOnly, configuration.Delimiter, configuration.BatchSize, configuration.CommandTimeout, configuration.ApplyByTool, configuration.ApplyByToolVersion, configuration.Environment); return(builder); }
public InfoController( IConfiguration configuration, IBulkImportService importService, IServiceClientFactory serviceClientFactory) { this.configuration = configuration ?? throw new ArgumentNullException(nameof(configuration)); this.importService = importService ?? throw new ArgumentNullException(nameof(importService)); this.serviceClientFactory = serviceClientFactory ?? throw new ArgumentNullException(nameof(serviceClientFactory)); }
/// <summary> /// Runs database migrations with Yuniql. Use this interface to run migrations targeting non-sqlserver platforms such as PostgreSql and MySql. /// </summary> /// <param name="builder"></param> /// <param name="dataService">Implementation of <see cref="IDataService". See Yuniql.PostgreSql and Yuniql.MySql pacages./></param> /// <param name="bulkImportService">Implementation of <see cref="IBulkImportService". See Yuniql.PostgreSql and Yuniql.MySql pacages./></param> /// <param name="traceService">Your custom implementation of ITraceService interface</param> /// <param name="configuration">Desired configuration when yuniql runs. Set your workspace location, connection string, target version and other parameters.</param> /// <returns></returns> public static IApplicationBuilder UseYuniql( this IApplicationBuilder builder, IDataService dataService, IBulkImportService bulkImportService, ITraceService traceService, Configuration configuration ) { ConfigurationHelper.Initialize(configuration); var migrationServiceFactory = new MigrationServiceFactory(traceService); var migrationService = migrationServiceFactory.Create(dataService, bulkImportService); migrationService.Run(); return(builder); }
/// <inheritdoc /> public MigrationService( IWorkspaceService workspaceService, IDataService dataService, IBulkImportService bulkImportService, IMetadataService metadataService, ITokenReplacementService tokenReplacementService, IDirectoryService directoryService, IFileService fileService, ITraceService traceService, IConfigurationService configurationService) { this._workspaceService = workspaceService; this._dataService = dataService; this._bulkImportService = bulkImportService; this._tokenReplacementService = tokenReplacementService; this._directoryService = directoryService; this._fileService = fileService; this._traceService = traceService; this._configurationService = configurationService; this._metadataService = metadataService; }
private IMigrationService Create(IDataService dataService, IBulkImportService bulkImportService) { var localVersionService = new LocalVersionService(_traceService); var tokenReplacementService = new TokenReplacementService(_traceService); var directoryService = new DirectoryService(); var fileService = new FileService(); var configurationService = new ConfigurationDataService(dataService, _traceService, tokenReplacementService); var migrationService = new MigrationService( localVersionService, dataService, bulkImportService, configurationService, tokenReplacementService, directoryService, fileService, _traceService); return(migrationService); }
private IMigrationService CreateInternal(IDataService dataService, IBulkImportService bulkImportService) { var directoryService = new DirectoryService(); var fileService = new FileService(); var workspaceService = new WorkspaceService(_traceService, directoryService, fileService); var tokenReplacementService = new TokenReplacementService(_traceService); var metadataService = new MetadataService(dataService, _traceService, tokenReplacementService); var environmentService = new EnvironmentService(); var configurationService = new ConfigurationService(environmentService, workspaceService, _traceService); var migrationService = new MigrationService( workspaceService, dataService, bulkImportService, metadataService, tokenReplacementService, directoryService, fileService, _traceService, configurationService); return(migrationService); }
/// <summary> /// Create instance of <see cref="IMigrationService"/> and uses external data services. /// When targeting PostgreSql or MySql, this is where you can pass the implementation of <see cref="IDataService"/> and <see cref="IBulkImportService"/>. /// </summary> /// <param name="dataService">Platform specific data service providing compatible SQL statements and connection objects.</param> /// <param name="bulkImportService">Platform specific service provding support for bulk import of CSV files.</param> /// <returns>An instance of <see cref="IMigrationService"/> and uses external data services.</returns> public IMigrationService Create(IDataService dataService, IBulkImportService bulkImportService) { return(CreateInternal(dataService, bulkImportService)); }
public ImportDataMartHandler(IBulkImportService bulkImportService, ILogger <ImportDataMartHandler> logger, IDataMartRepository dataMartRepository) { _bulkImportService = bulkImportService; _logger = logger; _dataMartRepository = dataMartRepository; }
public MonitorBulkImport(IReportService reportService, IBulkImportService bulkImportService) { _reportService = reportService; _bulkImportService = bulkImportService; }
public ImportPersonHandler(ICsvService csvService, IBulkImportService bulkImportService, ILogger <ImportPersonHandler> logger) { _csvService = csvService; _bulkImportService = bulkImportService; _logger = logger; }