cosmos-provider

Document EF Core Cosmos DB provider internals for contributor change planning.

14.8k|3.4k|Updated Jan 23, 2014
One-click install
npx skills add https://github.com/dotnet/efcore --skill cosmos-provider
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cosmos-provider
Source: https://github.com/dotnet/efcore/tree/main/.agents/skills/cosmos-provider
Command: npx skills add https://github.com/dotnet/efcore --skill cosmos-provider

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Provides implementation details and contributor guidance for the EF Core Azure Cosmos DB provider to help modify Cosmos-specific code safely and efficiently.

Core Features & Use Cases

  • Cosmos provider internals documentation, including JSON document materialization and the parallel query pipeline.
  • Guidance on Cosmos-specific configurations such as partition key usage and ETag-based optimistic concurrency.
  • Notes on differences from relational providers, e.g., lack of migrations, document-centric storage, and no cross-container joins.

Quick Start

Explain the changes needed to implement a Cosmos provider modification and outline a minimal patch plan.

Frequently Asked Questions about cosmos-provider

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How does the EF Core Cosmos DB provider handle JSON document materialization?

The EF Core Cosmos DB provider handles JSON document materialization by mapping entity properties directly to JSON document structures. This process relies on a parallel query pipeline to efficiently retrieve and hydrate documents from Azure Cosmos DB.

How do I configure partition key usage and optimistic concurrency in EF Core for Cosmos DB?

To configure partition key usage and optimistic concurrency in EF Core for Cosmos DB, define partition keys during model configuration and enable ETag-based concurrency tracking. This ensures proper document routing and safe concurrent updates within the Cosmos provider.

Does the EF Core Cosmos DB provider support database migrations like relational providers?

No, the EF Core Cosmos DB provider does not support database migrations like relational providers. Because it uses document-centric storage, it omits migrations, cross-container joins, and relational schema management paradigms entirely.

What is the best way to plan code changes for EF Core Cosmos-specific features?

The best way to plan code changes for EF Core Cosmos-specific features involves outlining a minimal patch plan that respects query generation and configuration rules. Contributors must review provider internals to modify Cosmos-specific code safely and efficiently.

Why does the EF Core Cosmos DB provider lack cross-container joins?

The EF Core Cosmos DB provider lacks cross-container joins because it operates on a document-centric storage model rather than a relational schema. This architectural difference means queries are scoped to individual containers, omitting relational join capabilities.