Skip to content
New issue

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

.Net Aspire Cosmos Db EF Documentation AddCosmosDbContext example is incorrect #2660

Open
ERobishaw opened this issue Feb 22, 2025 · 1 comment · May be fixed by #2566
Open

.Net Aspire Cosmos Db EF Documentation AddCosmosDbContext example is incorrect #2660

ERobishaw opened this issue Feb 22, 2025 · 1 comment · May be fixed by #2566
Assignees
Labels
database Content related to database. doc-bug Problem with the content; needs to be fixed [org][type][category] in-pr okr-health okr-quality Content-health KR: Concerns article defects/freshness or build warnings. Pri1 High priority, do before Pri2 and Pri3 🗺️ reQUEST Triggers an issue to be imported into Quest.

Comments

@ERobishaw
Copy link

Describe the issue or suggestion

The documentation is incorrect for adding a CosmosDbContext to the client.

here and in Learn calls for adding a CosmosDbContext with the single parameter of connection name. But this is not an option.

This code example is wrong:

builder.AddCosmosDbContext<MyDbContext>("cosmosdb");

This code compiles, but doesn't seem to work, as expected, at-least in conjunction with the Cosmos Emulator:

builder.AddCosmosDbContext<MyDbContext>("cosmosdb", "databasename");
@dotnetrepoman dotnetrepoman bot added the ⌚ Not Triaged Not triaged label Feb 22, 2025
@ERobishaw
Copy link
Author

As a side note, the documentation attached to the Nuget package IS correct:

here: https://www.nuget.org/packages/Aspire.Microsoft.EntityFrameworkCore.Cosmos

@ERobishaw ERobishaw changed the title .Net Aspire Cosmos Db EF Documentation Wrong .Net Aspire Cosmos Db EF Documentation AddCosmosDbContext example is incorrect Feb 22, 2025
@IEvangelist IEvangelist self-assigned this Feb 24, 2025
@IEvangelist IEvangelist added 🗺️ reQUEST Triggers an issue to be imported into Quest. Pri1 High priority, do before Pri2 and Pri3 database Content related to database. doc-bug Problem with the content; needs to be fixed [org][type][category] okr-quality Content-health KR: Concerns article defects/freshness or build warnings. and removed ⌚ Not Triaged Not triaged labels Feb 24, 2025
@dotnetrepoman dotnetrepoman bot added 🗺️ mapQUEST Only used as a way to mark an issue as updated. RepoMan should instantly remove it. and removed 🗺️ mapQUEST Only used as a way to mark an issue as updated. RepoMan should instantly remove it. labels Feb 24, 2025
@IEvangelist IEvangelist linked a pull request Feb 24, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
database Content related to database. doc-bug Problem with the content; needs to be fixed [org][type][category] in-pr okr-health okr-quality Content-health KR: Concerns article defects/freshness or build warnings. Pri1 High priority, do before Pri2 and Pri3 🗺️ reQUEST Triggers an issue to be imported into Quest.
Projects
Development

Successfully merging a pull request may close this issue.

2 participants