CtrlK
BlogDocsLog inGet started
Tessl Logo

cosmos-provider

Implementation details for the EF Core Azure Cosmos DB provider. Use when changing Cosmos-specific code.

67

Quality

80%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide

SecuritybySnyk

Passed

No findings from the security scan

Fix and improve this skill with Tessl

tessl review fix ./.agents/skills/cosmos-provider/SKILL.md
SKILL.md
Quality
Evals
Security

Cosmos DB Provider

Non-relational provider with its own parallel query pipeline. Uses JSON for document materialization.

Key Differences from Relational

  • No migrations — use EnsureCreated()
  • Documents as JSON — owned and complex types become embedded objects
  • Partition key configuration required for performance
  • ETag for optimistic concurrency
  • No cross-container joins

Azure Cosmos DB Emulator for Tests

  • TestEnvironment.InitializeAsync() auto-starts a Testcontainers.CosmosDb container when Test__Cosmos__DefaultConnection is not set. Set the env var to use an existing emulator instead.
  • Skip tests requiring unsupported features on the Linux emulator with [ConditionalFact(typeof(CosmosTestEnvironment), nameof(CosmosTestEnvironment.IsNotLinuxEmulator))].
Repository
dotnet/efcore
Last updated
First committed

Also appears in

dotnet/dotnet
In sync

since Jul 28, 2026

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.