From 63566f06f264fd5600a7c0f93ef53c49061efd93 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 13 Apr 2026 23:51:02 +0000 Subject: [PATCH 1/3] Initial plan From 86874c0d8d3fab58b8269e629069f0f270a3440b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 13 Apr 2026 23:53:54 +0000 Subject: [PATCH 2/3] Improve XML docs for GetMappingStrategy to reference possible return 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> --- .../Extensions/RelationalEntityTypeExtensions.cs | 8 +++++++- .../Extensions/RelationalTypeBaseExtensions.cs | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/EFCore.Relational/Extensions/RelationalEntityTypeExtensions.cs b/src/EFCore.Relational/Extensions/RelationalEntityTypeExtensions.cs index 7b7ca39ac61..06f8e52bac1 100644 --- a/src/EFCore.Relational/Extensions/RelationalEntityTypeExtensions.cs +++ b/src/EFCore.Relational/Extensions/RelationalEntityTypeExtensions.cs @@ -1518,7 +1518,13 @@ public static void SetIsTableExcludedFromMigrations( /// Gets the mapping strategy for the derived types. /// /// The entity type. - /// The mapping strategy for the derived types. + /// + /// The mapping strategy for the derived types, or if no strategy is configured + /// and the entity type has no derived types. The possible values are + /// , + /// , and + /// . + /// public static string? GetMappingStrategy(this IReadOnlyEntityType entityType) => (string?)entityType[RelationalAnnotationNames.MappingStrategy] ?? (entityType.BaseType != null diff --git a/src/EFCore.Relational/Extensions/RelationalTypeBaseExtensions.cs b/src/EFCore.Relational/Extensions/RelationalTypeBaseExtensions.cs index 89b67725b3a..dd4d29c93cf 100644 --- a/src/EFCore.Relational/Extensions/RelationalTypeBaseExtensions.cs +++ b/src/EFCore.Relational/Extensions/RelationalTypeBaseExtensions.cs @@ -350,7 +350,13 @@ public static IEnumerable GetMappingFragments( /// Gets the mapping strategy for the derived types. /// /// The type. - /// The mapping strategy for the derived types. + /// + /// The mapping strategy for the derived types, or if no strategy is configured + /// and the entity type has no derived types. The possible values are + /// , + /// , and + /// . + /// public static string? GetMappingStrategy(this IReadOnlyTypeBase typeBase) => typeBase.ContainingEntityType.GetMappingStrategy(); From ff30fd3531dba056f8d7c9595467c6028103de46 Mon Sep 17 00:00:00 2001 From: Andriy Svyryd Date: Mon, 13 Apr 2026 17:27:55 -0700 Subject: [PATCH 3/3] Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .../Extensions/RelationalEntityTypeExtensions.cs | 4 ++-- .../Extensions/RelationalTypeBaseExtensions.cs | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/EFCore.Relational/Extensions/RelationalEntityTypeExtensions.cs b/src/EFCore.Relational/Extensions/RelationalEntityTypeExtensions.cs index 06f8e52bac1..1f349709a59 100644 --- a/src/EFCore.Relational/Extensions/RelationalEntityTypeExtensions.cs +++ b/src/EFCore.Relational/Extensions/RelationalEntityTypeExtensions.cs @@ -1520,10 +1520,10 @@ public static void SetIsTableExcludedFromMigrations( /// The entity type. /// /// The mapping strategy for the derived types, or if no strategy is configured - /// and the entity type has no derived types. The possible values are + /// and the entity type has no derived types. Well-known values include /// , /// , and - /// . + /// , but other values may be returned if configured. /// public static string? GetMappingStrategy(this IReadOnlyEntityType entityType) => (string?)entityType[RelationalAnnotationNames.MappingStrategy] diff --git a/src/EFCore.Relational/Extensions/RelationalTypeBaseExtensions.cs b/src/EFCore.Relational/Extensions/RelationalTypeBaseExtensions.cs index dd4d29c93cf..ecf8df98a07 100644 --- a/src/EFCore.Relational/Extensions/RelationalTypeBaseExtensions.cs +++ b/src/EFCore.Relational/Extensions/RelationalTypeBaseExtensions.cs @@ -352,10 +352,11 @@ public static IEnumerable GetMappingFragments( /// The type. /// /// The mapping strategy for the derived types, or if no strategy is configured - /// and the entity type has no derived types. The possible values are + /// and the entity type has no derived types. Well-known values are /// , /// , and - /// . + /// , but other values may be returned + /// if a different mapping strategy has been configured. /// public static string? GetMappingStrategy(this IReadOnlyTypeBase typeBase) => typeBase.ContainingEntityType.GetMappingStrategy();