Improve XML documentation for GetMappingStrategy return values#38091
Merged
AndriySvyryd merged 3 commits intomainfrom Apr 14, 2026
Merged
Improve XML documentation for GetMappingStrategy return values#38091AndriySvyryd merged 3 commits intomainfrom
AndriySvyryd merged 3 commits intomainfrom
Conversation
…values Agent-Logs-Url: https://github.com/dotnet/efcore/sessions/80c3b789-ccd9-4304-9cea-023e11f874e8 Co-authored-by: AndriySvyryd <6539701+AndriySvyryd@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add documentation for GetMappingStrategy return value
Improve XML documentation for GetMappingStrategy return values
Apr 13, 2026
There was a problem hiding this comment.
Pull request overview
Improves EF Core Relational XML documentation for GetMappingStrategy() so users can understand the expected return values without inspecting source/decompiling, addressing #38092.
Changes:
- Expanded
<returns>docs forRelationalEntityTypeExtensions.GetMappingStrategy(IReadOnlyEntityType). - Expanded
<returns>docs forRelationalTypeBaseExtensions.GetMappingStrategy(IReadOnlyTypeBase). - Added references to well-known mapping strategy constants (
TPH/TPT/TPC) viaRelationalAnnotationNames.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| src/EFCore.Relational/Extensions/RelationalTypeBaseExtensions.cs | Updates XML <returns> docs for GetMappingStrategy(IReadOnlyTypeBase). |
| src/EFCore.Relational/Extensions/RelationalEntityTypeExtensions.cs | Updates XML <returns> docs for GetMappingStrategy(IReadOnlyEntityType). |
src/EFCore.Relational/Extensions/RelationalEntityTypeExtensions.cs
Outdated
Show resolved
Hide resolved
src/EFCore.Relational/Extensions/RelationalEntityTypeExtensions.cs
Outdated
Show resolved
Hide resolved
src/EFCore.Relational/Extensions/RelationalTypeBaseExtensions.cs
Outdated
Show resolved
Hide resolved
src/EFCore.Relational/Extensions/RelationalTypeBaseExtensions.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
roji
approved these changes
Apr 14, 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.
Fixes #38092
Users had no way to know what string values
GetMappingStrategy()could return without decompiling the source — the docs just said "The mapping strategy for the derived types" with no further detail.Changes
<returns>docs on bothRelationalEntityTypeExtensions.GetMappingStrategyandRelationalTypeBaseExtensions.GetMappingStrategyto:nullis returned when no strategy is configured and the entity type has no derived types<see cref>links to their constants inRelationalAnnotationNames:TphMappingStrategy("TPH")TptMappingStrategy("TPT")TpcMappingStrategy("TPC")