From ef3d9930abe986b96091bbbcef7fe0196761913e Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Mon, 13 Apr 2026 12:18:38 -0700 Subject: [PATCH 1/2] [release/10.0] Fix ComplexProperty treated as nullable after update from EF Core 9.0 to 10.0 (#38045) Co-authored-by: AndriySvyryd <6539701+AndriySvyryd@users.noreply.github.com> --- .../Internal/SnapshotModelProcessor.cs | 5 ++- .../Design/SnapshotModelProcessorTest.cs | 36 +++++++++++++++++++ 2 files changed, 38 insertions(+), 3 deletions(-) diff --git a/src/EFCore.Design/Migrations/Internal/SnapshotModelProcessor.cs b/src/EFCore.Design/Migrations/Internal/SnapshotModelProcessor.cs index 2fa73c9a226..c46bb2bf93b 100644 --- a/src/EFCore.Design/Migrations/Internal/SnapshotModelProcessor.cs +++ b/src/EFCore.Design/Migrations/Internal/SnapshotModelProcessor.cs @@ -129,9 +129,8 @@ private void ProcessComplexProperties(IReadOnlyTypeBase typeBase, string version private static void UpdateComplexPropertyNullability(IMutableComplexProperty complexProperty, string version) { - if ((version.StartsWith("8.", StringComparison.Ordinal) - || version.StartsWith("9.", StringComparison.Ordinal)) - && !complexProperty.ClrType.IsNullableType()) + if (version.StartsWith("8.", StringComparison.Ordinal) + || version.StartsWith("9.", StringComparison.Ordinal)) { complexProperty.IsNullable = false; } diff --git a/test/EFCore.Design.Tests/Migrations/Design/SnapshotModelProcessorTest.cs b/test/EFCore.Design.Tests/Migrations/Design/SnapshotModelProcessorTest.cs index 5faa18ad8ca..a9e381ac96e 100644 --- a/test/EFCore.Design.Tests/Migrations/Design/SnapshotModelProcessorTest.cs +++ b/test/EFCore.Design.Tests/Migrations/Design/SnapshotModelProcessorTest.cs @@ -293,6 +293,42 @@ public void Updates_nested_complex_property_nullability_for_pre_10_snapshots() Assert.Empty(reporter.Messages); } + [ConditionalFact] + public void Updates_property_bag_complex_property_nullability_for_pre_10_snapshots() + { + var builder = new ModelBuilder(); + var model = builder.Model; + ((Model)model).SetProductVersion("9.0.0"); + + builder.Entity( + "TestEntity", b => + { + b.Property("Id"); + b.HasKey("Id"); + + b.ComplexProperty(typeof(Dictionary), "Value", "TestEntity.Value#StructValue", b1 => + { + b1.Property("Value"); + }); + }); + + var entityType = model.GetEntityTypes().Single(); + var complexProperty = entityType.GetComplexProperties().Single(); + Assert.Equal(typeof(Dictionary), complexProperty.ClrType); + + var complexPropertyInternal = (ComplexProperty)complexProperty; + Assert.Null(complexPropertyInternal.GetIsNullableConfigurationSource()); + Assert.True(complexProperty.IsNullable); + + var reporter = new TestOperationReporter(); + var processor = new SnapshotModelProcessor(reporter, DummyModelRuntimeInitializer.Instance); + processor.Process(model); + + Assert.NotNull(complexPropertyInternal.GetIsNullableConfigurationSource()); + Assert.False(complexProperty.IsNullable); + Assert.Empty(reporter.Messages); + } + private static void AssertSameSnapshot(Type snapshotType, DbContext context) { var differ = context.GetService(); From 49c106d47fdcf0f333f01cfe86eafa50412c8025 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Tue, 14 Apr 2026 14:19:04 +0000 Subject: [PATCH 2/2] Update dependencies from build 310209 (#38094) [release/10.0] Source code updates from dotnet/dotnet --- NuGet.config | 2 +- eng/Version.Details.props | 10 ++++---- eng/Version.Details.xml | 48 +++++++++++++++++++-------------------- global.json | 4 ++-- 4 files changed, 32 insertions(+), 32 deletions(-) diff --git a/NuGet.config b/NuGet.config index fcc1723d8a9..3b1008fbd50 100644 --- a/NuGet.config +++ b/NuGet.config @@ -4,7 +4,7 @@ - + diff --git a/eng/Version.Details.props b/eng/Version.Details.props index 01740e38fc8..e1b417ac638 100644 --- a/eng/Version.Details.props +++ b/eng/Version.Details.props @@ -6,9 +6,9 @@ This file should be imported by eng/Versions.props - 10.0.0-beta.26210.105 - 10.0.0-beta.26210.105 - 10.0.0-beta.26210.105 + 10.0.0-beta.26213.115 + 10.0.0-beta.26213.115 + 10.0.0-beta.26213.115 10.0.7 10.0.7 10.0.7 @@ -16,10 +16,10 @@ This file should be imported by eng/Versions.props 10.0.7 10.0.7 10.0.7 - 10.0.7-servicing.26210.105 + 10.0.7-servicing.26213.115 10.0.7 10.0.7 - 10.0.7-servicing.26210.105 + 10.0.7-servicing.26213.115 10.0.7 10.0.7 10.0.7 diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index af0e6a92b33..610570cb6ea 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -1,80 +1,80 @@ - + https://github.com/dotnet/dotnet - d14d02dd9f70268be43db2ae722433f7d4461fb8 + 5d23756b884483995432a21829fe65466b19e948 https://github.com/dotnet/dotnet - d14d02dd9f70268be43db2ae722433f7d4461fb8 + 5d23756b884483995432a21829fe65466b19e948 https://github.com/dotnet/dotnet - d14d02dd9f70268be43db2ae722433f7d4461fb8 + 5d23756b884483995432a21829fe65466b19e948 https://github.com/dotnet/dotnet - d14d02dd9f70268be43db2ae722433f7d4461fb8 + 5d23756b884483995432a21829fe65466b19e948 https://github.com/dotnet/dotnet - d14d02dd9f70268be43db2ae722433f7d4461fb8 + 5d23756b884483995432a21829fe65466b19e948 https://github.com/dotnet/dotnet - d14d02dd9f70268be43db2ae722433f7d4461fb8 + 5d23756b884483995432a21829fe65466b19e948 https://github.com/dotnet/dotnet - d14d02dd9f70268be43db2ae722433f7d4461fb8 + 5d23756b884483995432a21829fe65466b19e948 - + https://github.com/dotnet/dotnet - d14d02dd9f70268be43db2ae722433f7d4461fb8 + 5d23756b884483995432a21829fe65466b19e948 https://github.com/dotnet/dotnet - d14d02dd9f70268be43db2ae722433f7d4461fb8 + 5d23756b884483995432a21829fe65466b19e948 https://github.com/dotnet/dotnet - d14d02dd9f70268be43db2ae722433f7d4461fb8 + 5d23756b884483995432a21829fe65466b19e948 - + https://github.com/dotnet/dotnet - d14d02dd9f70268be43db2ae722433f7d4461fb8 + 5d23756b884483995432a21829fe65466b19e948 https://github.com/dotnet/dotnet - d14d02dd9f70268be43db2ae722433f7d4461fb8 + 5d23756b884483995432a21829fe65466b19e948 https://github.com/dotnet/dotnet - d14d02dd9f70268be43db2ae722433f7d4461fb8 + 5d23756b884483995432a21829fe65466b19e948 https://github.com/dotnet/dotnet - d14d02dd9f70268be43db2ae722433f7d4461fb8 + 5d23756b884483995432a21829fe65466b19e948 https://github.com/dotnet/dotnet - d14d02dd9f70268be43db2ae722433f7d4461fb8 + 5d23756b884483995432a21829fe65466b19e948 - + https://github.com/dotnet/dotnet - d14d02dd9f70268be43db2ae722433f7d4461fb8 + 5d23756b884483995432a21829fe65466b19e948 - + https://github.com/dotnet/dotnet - d14d02dd9f70268be43db2ae722433f7d4461fb8 + 5d23756b884483995432a21829fe65466b19e948 - + https://github.com/dotnet/dotnet - d14d02dd9f70268be43db2ae722433f7d4461fb8 + 5d23756b884483995432a21829fe65466b19e948 diff --git a/global.json b/global.json index 9a50634c305..e70f0687add 100644 --- a/global.json +++ b/global.json @@ -18,7 +18,7 @@ } }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.26210.105", - "Microsoft.DotNet.Helix.Sdk": "10.0.0-beta.26210.105" + "Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.26213.115", + "Microsoft.DotNet.Helix.Sdk": "10.0.0-beta.26213.115" } }