Merged
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR introduces the IStructuralProperty interface to unify complex properties and navigation properties under a common abstraction. The purpose is to simplify handling of properties that reference types (both complex types and entity types) throughout the EF Core codebase.
- Introduces new interface hierarchy for structural properties
- Consolidates handling of navigation and complex properties
- Adds validation to prevent shadow properties on complex types
Reviewed Changes
Copilot reviewed 33 out of 34 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| IStructuralProperty.cs | Introduces new interface for properties that reference types |
| IReadOnlyStructuralProperty.cs | Read-only version of structural property interface |
| IMutableStructuralProperty.cs | Mutable version for model building |
| IConventionStructuralProperty.cs | Convention-based version for model building |
| CollectionResultExpression.cs | Updates to use IStructuralProperty instead of IPropertyBase |
| ModelValidator.cs | Adds validation to prevent shadow properties on complex types |
| Various test files | Adds tests for new functionality and skips failing tests |
Files not reviewed (1)
- src/EFCore/Properties/CoreStrings.Designer.cs: Language not supported
AndriySvyryd
commented
Aug 1, 2025
...l/Query/RelationalShapedQueryCompilingExpressionVisitor.ShaperProcessingExpressionVisitor.cs
Outdated
Show resolved
Hide resolved
f912b4f to
3c55c01
Compare
AndriySvyryd
commented
Aug 5, 2025
7ac6b9e to
352443c
Compare
roji
approved these changes
Aug 11, 2025
...l/Query/RelationalShapedQueryCompilingExpressionVisitor.ShaperProcessingExpressionVisitor.cs
Outdated
Show resolved
Hide resolved
352443c to
d16aa4d
Compare
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.
Add support for property bag complex types
Throw for shadow properties on complex types
Fixes #31237
cc @artl93