Update DIExtensions for enhanced DbContext configuration

Modified the `AddEnvelopeGeneratorInfrastructureServices` method to accept a service provider, allowing for more complex DbContext configurations. Added a using directive for `Microsoft.Extensions.DependencyInjection` in `Program.cs`. Updated the method call to utilize the new signature, enabling logging of SQL commands and sensitive data during database operations.
This commit is contained in:
Developer 02
2025-05-12 16:35:48 +02:00
parent 456c591fae
commit 05867cc645
2 changed files with 10 additions and 2 deletions

View File

@@ -33,7 +33,7 @@ public static class DIExtensions
/// will be created per HTTP request (or per scope) within the dependency injection container.
/// </remarks>
public static IServiceCollection AddEnvelopeGeneratorInfrastructureServices(this IServiceCollection services,
Action<DbContextOptionsBuilder>? dbContextOptions = null,
Action<IServiceProvider, DbContextOptionsBuilder>? dbContextOptions = null,
IConfiguration? sqlExecutorConfiguration = null,
Action<SQLExecutorParams>? sqlExecutorConfigureOptions = null)
{