From 63e1c27668fbebef4f7310b5abdd5c3576017a08 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Fri, 27 Mar 2026 07:29:30 +0000 Subject: [PATCH 1/2] Update dependencies from build 308038 (#38020) [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 990063f762a..4a757d1ad04 100644 --- a/NuGet.config +++ b/NuGet.config @@ -4,7 +4,7 @@ - + diff --git a/eng/Version.Details.props b/eng/Version.Details.props index 06a21183ca5..70fac2cdd7d 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.26175.123 - 10.0.0-beta.26175.123 - 10.0.0-beta.26175.123 + 10.0.0-beta.26176.117 + 10.0.0-beta.26176.117 + 10.0.0-beta.26176.117 10.0.6 10.0.6 10.0.6 @@ -16,10 +16,10 @@ This file should be imported by eng/Versions.props 10.0.6 10.0.6 10.0.6 - 10.0.6-servicing.26175.123 + 10.0.6-servicing.26176.117 10.0.6 10.0.6 - 10.0.6-servicing.26175.123 + 10.0.6-servicing.26176.117 10.0.6 10.0.6 10.0.6 diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 84e1bac1f32..2531628161b 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -1,80 +1,80 @@ - + https://github.com/dotnet/dotnet - ebe6ebbcfec145053fd5e04812abe8d2a4e53bda + 8dc731afc09c5dca3dc7cee575f3bf0c61c2d919 https://github.com/dotnet/dotnet - ebe6ebbcfec145053fd5e04812abe8d2a4e53bda + 8dc731afc09c5dca3dc7cee575f3bf0c61c2d919 https://github.com/dotnet/dotnet - ebe6ebbcfec145053fd5e04812abe8d2a4e53bda + 8dc731afc09c5dca3dc7cee575f3bf0c61c2d919 https://github.com/dotnet/dotnet - ebe6ebbcfec145053fd5e04812abe8d2a4e53bda + 8dc731afc09c5dca3dc7cee575f3bf0c61c2d919 https://github.com/dotnet/dotnet - ebe6ebbcfec145053fd5e04812abe8d2a4e53bda + 8dc731afc09c5dca3dc7cee575f3bf0c61c2d919 https://github.com/dotnet/dotnet - ebe6ebbcfec145053fd5e04812abe8d2a4e53bda + 8dc731afc09c5dca3dc7cee575f3bf0c61c2d919 https://github.com/dotnet/dotnet - ebe6ebbcfec145053fd5e04812abe8d2a4e53bda + 8dc731afc09c5dca3dc7cee575f3bf0c61c2d919 - + https://github.com/dotnet/dotnet - ebe6ebbcfec145053fd5e04812abe8d2a4e53bda + 8dc731afc09c5dca3dc7cee575f3bf0c61c2d919 https://github.com/dotnet/dotnet - ebe6ebbcfec145053fd5e04812abe8d2a4e53bda + 8dc731afc09c5dca3dc7cee575f3bf0c61c2d919 https://github.com/dotnet/dotnet - ebe6ebbcfec145053fd5e04812abe8d2a4e53bda + 8dc731afc09c5dca3dc7cee575f3bf0c61c2d919 - + https://github.com/dotnet/dotnet - ebe6ebbcfec145053fd5e04812abe8d2a4e53bda + 8dc731afc09c5dca3dc7cee575f3bf0c61c2d919 https://github.com/dotnet/dotnet - ebe6ebbcfec145053fd5e04812abe8d2a4e53bda + 8dc731afc09c5dca3dc7cee575f3bf0c61c2d919 https://github.com/dotnet/dotnet - ebe6ebbcfec145053fd5e04812abe8d2a4e53bda + 8dc731afc09c5dca3dc7cee575f3bf0c61c2d919 https://github.com/dotnet/dotnet - ebe6ebbcfec145053fd5e04812abe8d2a4e53bda + 8dc731afc09c5dca3dc7cee575f3bf0c61c2d919 https://github.com/dotnet/dotnet - ebe6ebbcfec145053fd5e04812abe8d2a4e53bda + 8dc731afc09c5dca3dc7cee575f3bf0c61c2d919 - + https://github.com/dotnet/dotnet - ebe6ebbcfec145053fd5e04812abe8d2a4e53bda + 8dc731afc09c5dca3dc7cee575f3bf0c61c2d919 - + https://github.com/dotnet/dotnet - ebe6ebbcfec145053fd5e04812abe8d2a4e53bda + 8dc731afc09c5dca3dc7cee575f3bf0c61c2d919 - + https://github.com/dotnet/dotnet - ebe6ebbcfec145053fd5e04812abe8d2a4e53bda + 8dc731afc09c5dca3dc7cee575f3bf0c61c2d919 diff --git a/global.json b/global.json index c9196a9aa79..fb86d4ee51f 100644 --- a/global.json +++ b/global.json @@ -18,7 +18,7 @@ } }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.26175.123", - "Microsoft.DotNet.Helix.Sdk": "10.0.0-beta.26175.123" + "Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.26176.117", + "Microsoft.DotNet.Helix.Sdk": "10.0.0-beta.26176.117" } } From 0a57ab35328aa1c5e58c5ba2e271a90853553865 Mon Sep 17 00:00:00 2001 From: Shay Rojansky Date: Mon, 30 Mar 2026 21:05:45 +0300 Subject: [PATCH 2/2] Fix SetProperty discard lambda failing for nullable value type properties in ExecuteUpdate (#38007) Backport of #37975 to release/10.0. In ExpressionTreeFuncletizer.ProcessEvaluatableRoot, ConvertIfNeeded calls Visit which corrupts _state back to EvaluatableWithoutCapturedVariable when wrapping a constant int to int?. This causes the parent VisitLambda to treat the lambda as evaluatable, compiling it to a Func and breaking TranslateSetterValueSelector. Fix: reset state to NoEvaluatability after ConvertIfNeeded returns. Added quirk Microsoft.EntityFrameworkCore.Issue37974 to opt out. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Query/Internal/ExpressionTreeFuncletizer.cs | 13 ++++++++++++- .../BulkUpdates/NorthwindBulkUpdatesTestBase.cs | 10 ++++++++++ .../NorthwindBulkUpdatesSqlServerTest.cs | 13 +++++++++++++ .../BulkUpdates/NorthwindBulkUpdatesSqliteTest.cs | 12 ++++++++++++ 4 files changed, 47 insertions(+), 1 deletion(-) diff --git a/src/EFCore/Query/Internal/ExpressionTreeFuncletizer.cs b/src/EFCore/Query/Internal/ExpressionTreeFuncletizer.cs index ebb401accb3..45e6f36c87b 100644 --- a/src/EFCore/Query/Internal/ExpressionTreeFuncletizer.cs +++ b/src/EFCore/Query/Internal/ExpressionTreeFuncletizer.cs @@ -28,6 +28,9 @@ public class ExpressionTreeFuncletizer : ExpressionVisitor private static readonly bool UseOldBehavior37465 = AppContext.TryGetSwitch("Microsoft.EntityFrameworkCore.Issue37465", out var enabled37465) && enabled37465; + private static readonly bool UseOldBehavior37974 = + AppContext.TryGetSwitch("Microsoft.EntityFrameworkCore.Issue37974", out var enabled37974) && enabled37974; + // The general algorithm here is the following. // 1. First, for each node type, visit that node's children and get their states (evaluatable, contains evaluatable, no evaluatable). // 2. Calculate the parent node's aggregate state from its children; a container node whose children are all evaluatable is itself @@ -2012,10 +2015,18 @@ private static StateType CombineStateTypes(StateType stateType1, StateType state return evaluatableRoot; } - return ConvertIfNeeded( + var constantExpression = ConvertIfNeeded( Constant(value, value is null ? evaluatableRoot.Type : value.GetType()), evaluatableRoot.Type); + // ConvertIfNeeded calls Visit which may have modified _state; reset it since we've already evaluated this root as a constant. + if (!UseOldBehavior37974) + { + state = State.NoEvaluatability; + } + + return constantExpression; + bool TryHandleNonEvaluatableAsRoot(Expression root, State state, bool asParameter, [NotNullWhen(true)] out Expression? result) { switch (root) diff --git a/test/EFCore.Specification.Tests/BulkUpdates/NorthwindBulkUpdatesTestBase.cs b/test/EFCore.Specification.Tests/BulkUpdates/NorthwindBulkUpdatesTestBase.cs index c91ccb1a089..e77e5883c5f 100644 --- a/test/EFCore.Specification.Tests/BulkUpdates/NorthwindBulkUpdatesTestBase.cs +++ b/test/EFCore.Specification.Tests/BulkUpdates/NorthwindBulkUpdatesTestBase.cs @@ -382,6 +382,16 @@ public virtual Task Update_Where_set_constant_via_lambda(bool async) rowsAffectedCount: 8, (b, a) => Assert.All(a, c => Assert.Equal("Updated", c.ContactName))); + [ConditionalTheory, MemberData(nameof(IsAsyncData))] + public virtual Task Update_Where_set_nullable_int_constant_via_discard_lambda(bool async) + => AssertUpdate( + async, + ss => ss.Set().Where(p => p.ProductID < 5), + e => e, + s => s.SetProperty(c => c.SupplierID, _ => 1), + rowsAffectedCount: 4, + (b, a) => Assert.All(a, p => Assert.Equal(1, p.SupplierID))); + [ConditionalTheory, MemberData(nameof(IsAsyncData))] public virtual async Task Update_Where_parameter_set_constant(bool async) { diff --git a/test/EFCore.SqlServer.FunctionalTests/BulkUpdates/NorthwindBulkUpdatesSqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/BulkUpdates/NorthwindBulkUpdatesSqlServerTest.cs index b600255d6d2..e2b2d376437 100644 --- a/test/EFCore.SqlServer.FunctionalTests/BulkUpdates/NorthwindBulkUpdatesSqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/BulkUpdates/NorthwindBulkUpdatesSqlServerTest.cs @@ -694,6 +694,19 @@ WHERE [c].[CustomerID] LIKE N'F%' """); } + public override async Task Update_Where_set_nullable_int_constant_via_discard_lambda(bool async) + { + await base.Update_Where_set_nullable_int_constant_via_discard_lambda(async); + + AssertExecuteUpdateSql( + """ +UPDATE [p] +SET [p].[SupplierID] = 1 +FROM [Products] AS [p] +WHERE [p].[ProductID] < 5 +"""); + } + public override async Task Update_Where_parameter_set_constant(bool async) { await base.Update_Where_parameter_set_constant(async); diff --git a/test/EFCore.Sqlite.FunctionalTests/BulkUpdates/NorthwindBulkUpdatesSqliteTest.cs b/test/EFCore.Sqlite.FunctionalTests/BulkUpdates/NorthwindBulkUpdatesSqliteTest.cs index fe1bce5f8c5..d4f26c9930e 100644 --- a/test/EFCore.Sqlite.FunctionalTests/BulkUpdates/NorthwindBulkUpdatesSqliteTest.cs +++ b/test/EFCore.Sqlite.FunctionalTests/BulkUpdates/NorthwindBulkUpdatesSqliteTest.cs @@ -674,6 +674,18 @@ public override async Task Update_Where_set_constant_via_lambda(bool async) """); } + public override async Task Update_Where_set_nullable_int_constant_via_discard_lambda(bool async) + { + await base.Update_Where_set_nullable_int_constant_via_discard_lambda(async); + + AssertExecuteUpdateSql( + """ +UPDATE "Products" AS "p" +SET "SupplierID" = 1 +WHERE "p"."ProductID" < 5 +"""); + } + public override async Task Update_Where_parameter_set_constant(bool async) { await base.Update_Where_parameter_set_constant(async);