Repository navigation
Allow null connection string with ConfigureDataSource - #3693
Conversation
There was a problem hiding this comment.
Pull request overview
This PR enables the use of ConfigureDataSource() without providing a connection string, allowing users to configure the connection details entirely through the NpgsqlDataSourceBuilder's connection string builder.
- Removed the null connection string guard that previously prevented creating a data source without an explicit connection string
- Added null coalescing to treat null connection strings as empty strings for dictionary key lookups
- Added a test case verifying the new functionality with a null connection string
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/EFCore.PG/Storage/Internal/NpgsqlDataSourceManager.cs | Removed null connection string guard and added null coalescing logic to support ConfigureDataSource without explicit connection string |
| test/EFCore.PG.Tests/NpgsqlRelationalConnectionTest.cs | Added test case for null connection string scenario and updated ConfigurableContext to accept nullable connection string |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Backported to 9.0.5 via 4f9503f |
|
Backported to 10.0.2 via caeb33b |
Fixes #3692