Repository navigation
Conversation
|
Tagging subscribers to this area: @maryamariyan, @safern Issue DetailsAdd missing connection string prefix POSTGRESQLCONNSTR_ for EnvironmentVariablesConfigurationProvider To fix #57545
|
|
Tests? |
|
Let me update the tests |
| else if (key.StartsWith(PostgreSqlServerPrefix, StringComparison.OrdinalIgnoreCase)) | ||
| { | ||
| prefix = PostgreSqlServerPrefix; | ||
| provider = "Npgsql"; |
There was a problem hiding this comment.
Sure, I guess (don't have much context here)... Though note that Npgsql isn't the only PG provider out there, so equating PostgreSQL with Npgsql could be problematic.
The same problem seems actually more acute: for SQL Server, Microsoft.Data.SqlClient is the modern thing to be used rather than System.Data.SqlClient. And for MySQL there's MySqlConnector, which is frequently better/faster.
Do we have to make a provider choice here, i.e. could we put "Postgres" instead of "Npgsql"? The application would then get the connection string for PG and pass it to Npgsql, assuming it's using that?
|
To further summarize @roji 's comment above here: The Azure UI is mentions databases (SQL Server, PostgreSQL), where the code in the environment variable configuration provider seems to translate that (SQL Server) to concrete providers (System.Data.SqlClient). For the cases where there might be multiple possible providers for a given database (e.g. Microsoft.Data.SqlClient), it would be odd to have to hardcode them at this level in .NET runtime. next TODO for this PR to progress:
Switching to draft PR, since it's not active atm. |
|
Draft Pull Request was automatically closed for inactivity. Please let us know if you'd like to reopen it. |
Add missing connection string prefix POSTGRESQLCONNSTR_ for EnvironmentVariablesConfigurationProvider
To fix #57545