Document breaking change: Cosmos undefined projections now throw (EF Core 11) - #5433
Merged
Conversation
Copilot
AI
changed the title
Document breaking change for Cosmos undefined projections (EF Core 11)
Document breaking change: Cosmos undefined projections now throw (EF Core 11)
Jul 28, 2026
Copilot created this pull request from a session on behalf of
AndriySvyryd
July 28, 2026 00:27
View session
Contributor
There was a problem hiding this comment.
Pull request overview
Documents an EF Core 11 breaking change for the Azure Cosmos DB provider: projections that evaluate to Cosmos undefined now consistently throw a clear InvalidOperationException, and provides mitigation guidance.
Changes:
- Adds a new EF Core 11 breaking change entry describing old/new behavior, rationale, and mitigations (
IsDefined,CoalesceUndefined). - Adds a brief “What’s New” note for Cosmos projections with a link to the breaking changes entry.
- Adds provider documentation explaining when
undefinedoccurs in Cosmos and how to handle it in projections.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| entity-framework/core/what-is-new/ef-core-11.0/whatsnew.md | Adds a Cosmos “undefined in projections” note and links to the breaking changes entry. |
| entity-framework/core/what-is-new/ef-core-11.0/breaking-changes.md | Adds a medium-impact breaking change section detailing the projection behavior change and mitigations. |
| entity-framework/core/providers/cosmos/querying.md | Adds provider guidance for handling undefined values in anonymous/DTO projections. |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
AndriySvyryd
approved these changes
Jul 28, 2026
cincuranet
approved these changes
Jul 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
EF Core 11 (dotnet/efcore#38550) changed Azure Cosmos DB projection behavior: anonymous/DTO projections that previously silently dropped
undefinedvalues (single-property viaSELECT VALUE) or threw crypticNullable object must have a valueexceptions (multi-property) now consistently throwInvalidOperationException: "A part of the projection was undefined, use the coalesce operator to handle possible undefined values."Changes
ef-core-11.0/breaking-changes.md— Medium-impact entry in summary table + full section: old/new behavior, rationale, mitigations viaIsDefined/CoalesceUndefinedef-core-11.0/whatsnew.md— Brief Cosmos DB section on the behavior change with link to breaking changesproviders/cosmos/querying.md— New "Undefined values in projections" section explaining whenundefinedoccurs and how to handle itMitigation pattern