Closed
Description
Add the following overload to MySqlConnector.DependencyInjection:
public static IServiceCollection AddMySqlDataSource(
this IServiceCollection serviceCollection,
string? connectionString,
Action<IServiceProvider, MySqlDataSourceBuilder> dataSourceBuilderAction, // THIS IS THE CHANGE
ServiceLifetime connectionLifetime = ServiceLifetime.Transient,
ServiceLifetime dataSourceLifetime = ServiceLifetime.Singleton);
This would allow users to configure the MySqlDataSourceBuilder
from services, e.g., getting the connection string or a periodic password provider from services. (Without having to recreate MySqlConnector.DependencyInjection themselves.)
Should align with npgsql/npgsql#4822 on final API.