# Cosmos Provider

> Cosmos Provider is an Agent Skill for development published in the dotnet/efcore repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

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

- Skill name: `cosmos-provider`
- Category: [Development](https://www.openparable.com/skill/development/1)
- Source: https://github.com/dotnet/efcore/blob/HEAD/.agents/skills/cosmos-provider/SKILL.md
- Repository: dotnet/efcore (14,740 GitHub stars when collected)

## SKILL.md

# 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))]`.

---

Source: https://www.openparable.com/skill/development/cosmos-provider (OpenParable). Cite the canonical URL above.
