Skip to content

Improve XML documentation for GetMappingStrategy return values#38091

Merged
AndriySvyryd merged 3 commits intomainfrom
copilot/document-getmappingstrategy-return-value
Apr 14, 2026
Merged

Improve XML documentation for GetMappingStrategy return values#38091
AndriySvyryd merged 3 commits intomainfrom
copilot/document-getmappingstrategy-return-value

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 13, 2026

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

  • Updated <returns> docs on both RelationalEntityTypeExtensions.GetMappingStrategy and RelationalTypeBaseExtensions.GetMappingStrategy to:
    • Document that null is returned when no strategy is configured and the entity type has no derived types
    • Reference the three possible return values via <see cref> links to their constants in RelationalAnnotationNames:
      • TphMappingStrategy ("TPH")
      • TptMappingStrategy ("TPT")
      • TpcMappingStrategy ("TPC")

…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
Copilot AI requested a review from AndriySvyryd April 13, 2026 23:54
@AndriySvyryd AndriySvyryd assigned roji and unassigned AndriySvyryd and Copilot Apr 13, 2026
@AndriySvyryd AndriySvyryd marked this pull request as ready for review April 13, 2026 23:55
@AndriySvyryd AndriySvyryd requested a review from a team as a code owner April 13, 2026 23:55
Copilot AI review requested due to automatic review settings April 13, 2026 23:55
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 for RelationalEntityTypeExtensions.GetMappingStrategy(IReadOnlyEntityType).
  • Expanded <returns> docs for RelationalTypeBaseExtensions.GetMappingStrategy(IReadOnlyTypeBase).
  • Added references to well-known mapping strategy constants (TPH/TPT/TPC) via RelationalAnnotationNames.

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).

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 14, 2026 00:27
@AndriySvyryd AndriySvyryd enabled auto-merge (squash) April 14, 2026 00:28
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

@AndriySvyryd AndriySvyryd disabled auto-merge April 14, 2026 17:24
@AndriySvyryd AndriySvyryd merged commit 2f9cc26 into main Apr 14, 2026
17 of 19 checks passed
@AndriySvyryd AndriySvyryd deleted the copilot/document-getmappingstrategy-return-value branch April 14, 2026 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Undocumented GetMappingStrategy() return value?

4 participants