Refactor envelope generator service dependencies
This commit replaces the `AddEnvelopeGeneratorRepositories` method with `AddEnvelopeGeneratorInfrastructureServices`, allowing for more flexible configuration through `IConfiguration` and `Action<SQLExecutorParams>`. The `SQLExecutor` class now utilizes `SQLExecutorParams` for its connection string, enhancing configurability. A new `SQLExecutorParams` class has been introduced to encapsulate connection string management. Various service registration calls have been updated to integrate the new infrastructure services, improving modularity and ease of database connection management.
This commit is contained in:
@@ -159,7 +159,7 @@ builder.Services.AddCookieBasedLocalizer() ;
|
||||
|
||||
// Envelope generator serives
|
||||
builder.Services
|
||||
.AddEnvelopeGeneratorRepositories()
|
||||
.AddEnvelopeGeneratorInfrastructureServices(sqlExecutorConfigureOptions: executor => executor.ConnectionString = connStr)
|
||||
.AddEnvelopeGeneratorServices(config);
|
||||
|
||||
var app = builder.Build();
|
||||
|
||||
Reference in New Issue
Block a user