We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the solution you'd like
https://www.npgsql.org/doc/release-notes/7.0.html#dbdatasource
Make use of the new NpgsqlDataSource from Npgsql, which allows things on a higher level
NpgsqlDataSource
The text was updated successfully, but these errors were encountered:
How about something like:
private static readonly ConcurrentDictionary<string, NpgsqlDataSource> DataSources = new(); protected override DbConnection CreateDbConnection(string connectionString) { var dataSource = DataSources.GetOrAdd(connectionString, x => { var dataSourceBuilder = new NpgsqlDataSourceBuilder(x); // Possibly provide extension method here? return dataSourceBuilder.Build(); }); return dataSource.CreateConnection(); }
Sorry, something went wrong.
No branches or pull requests
Describe the solution you'd like
https://www.npgsql.org/doc/release-notes/7.0.html#dbdatasource
Make use of the new
NpgsqlDataSource
from Npgsql, which allows things on a higher levelThe text was updated successfully, but these errors were encountered: