Skip to content

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

@ERobishaw

Description

@ERobishaw

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");

Metadata

Metadata

Assignees

Labels

🗺️ reQUESTTriggers an issue to be imported into Quest.Pri1High priority, do before Pri2 and Pri3databaseContent related to database.doc-bugProblem with the content; needs to be fixed [org][type][category]in-prokr-healthokr-qualityContent-health KR: Concerns article defects/freshness or build warnings.

Type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions