Correct the use of connections strings in integration documents#314
Open
alistairmatthews wants to merge 7 commits intomicrosoft:mainfrom
Open
Correct the use of connections strings in integration documents#314alistairmatthews wants to merge 7 commits intomicrosoft:mainfrom
alistairmatthews wants to merge 7 commits intomicrosoft:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR corrects the documentation for database integration by removing incorrect references to ConnectionStrings__<name> environment variables and replacing them with the proper Aspire method GetConnectionString("<name>"). The double-underscore format doesn't work correctly and should not be recommended to developers.
Changes:
- Updated C# code examples to use
GetConnectionString()instead ofGetValue<string>("ConnectionStrings__<name>") - Removed
ConnectionStrings__<name>from environment variable lists in various integration documentation files - Removed entire documentation sections that demonstrated the incorrect pattern
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| qdrant-host.mdx | Removes incorrect ConnectionStrings__qdrant from environment variable list |
| qdrant-get-started.mdx | Updates C# example to use GetConnectionString and removes Python/JavaScript examples with incorrect pattern |
| mongodb-host.mdx | Removes ConnectionStrings__mongodb from environment variable list |
| milvus-host.mdx | Removes ConnectionStrings__milvusdb from environment variable list |
| milvus-get-started.mdx | Updates C# example to use GetConnectionString with var keyword |
| elasticsearch-get-started.mdx | Removes entire section about injected Elasticsearch properties |
| sql-server-client.mdx | Removes ConnectionString property from documentation table and environment variable list |
| postgresql-client.mdx | Removes ConnectionString from table and updates explanatory text |
| oracle-host.mdx | Removes ConnectionStrings__oracledb from environment variable list |
| mysql-get-started.mdx | Updates C# example to use GetConnectionString with var keyword |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...frontend/src/content/docs/integrations/databases/elasticsearch/elasticsearch-get-started.mdx
Show resolved
Hide resolved
src/frontend/src/content/docs/integrations/databases/milvus/milvus-get-started.mdx
Show resolved
Hide resolved
src/frontend/src/content/docs/integrations/databases/mongodb/mongodb-host.mdx
Show resolved
Hide resolved
…section after feedback from @Copilot.
…nnection-string-code
IEvangelist
reviewed
Feb 5, 2026
|
|
||
| The following environment variables are available in the Python application: | ||
|
|
||
| - `ConnectionStrings__oracledb` - The connection string for the Oracle database |
Member
There was a problem hiding this comment.
Is this true? I thought connection strings were still present.
IEvangelist
approved these changes
Feb 5, 2026
...frontend/src/content/docs/integrations/databases/elasticsearch/elasticsearch-get-started.mdx
Outdated
Show resolved
Hide resolved
Contributor
Author
|
Closing to re-trigger checks. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Although in the Dashboard there is often an environment variable such as ConnectionStrings__postgresdb listed, this shouldn't be used in .NET code for two reasons:
var connectionUri = builder.Configuration.GetConnectionString("postgresdb");The double-underscore version is correct for Python and JavaScript examples.
Fixes: #312