-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change ExecuteUpdate to accept non-expression lambda #35257
base: main
Are you sure you want to change the base?
Conversation
879c7e5
to
f378a22
Compare
@ajcvickers this should be ready if you want to take a look. |
f378a22
to
b882a4e
Compare
/azp run |
No pipelines are associated with this pull request. |
/azp run |
No pipelines are associated with this pull request. |
@AndriySvyryd any idea why this PR refuses to build (I'm seeing this happening with other open PRs at the moment)? |
Probably an AZDO outage |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 23 out of 38 changed files in this pull request and generated no comments.
Files not reviewed (15)
- src/EFCore/Properties/CoreStrings.Designer.cs: Language not supported
- src/EFCore/Properties/CoreStrings.resx: Language not supported
- src/EFCore.Design/Query/Internal/CSharpToLinqTranslator.cs: Evaluated as low risk
- src/EFCore.Design/Query/Internal/PrecompiledQueryCodeGenerator.cs: Evaluated as low risk
- src/EFCore.Relational/Query/RelationalQueryableMethodTranslatingExpressionVisitor.ExecuteUpdate.cs: Evaluated as low risk
- src/EFCore.Relational/Query/SqlNullabilityProcessor.cs: Evaluated as low risk
- src/EFCore/Extensions/EntityFrameworkQueryableExtensions.cs: Evaluated as low risk
- src/EFCore/Query/QueryableMethodTranslatingExpressionVisitor.cs: Evaluated as low risk
- test/EFCore.SqlServer.FunctionalTests/BulkUpdates/NonSharedModelBulkUpdatesSqlServerTest.cs: Evaluated as low risk
- test/EFCore.SqlServer.FunctionalTests/BulkUpdates/ComplexTypeBulkUpdatesSqlServerTest.cs: Evaluated as low risk
- test/EFCore.Specification.Tests/TestUtilities/BulkUpdatesAsserter.cs: Evaluated as low risk
- test/EFCore.Specification.Tests/BulkUpdates/NorthwindBulkUpdatesTestBase.cs: Evaluated as low risk
- test/EFCore.Specification.Tests/BulkUpdates/BulkUpdatesTestBase.cs: Evaluated as low risk
- test/EFCore.Relational.Specification.Tests/TestUtilities/BulkUpdatesAsserter.cs: Evaluated as low risk
- test/EFCore.Relational.Specification.Tests/BulkUpdates/NorthwindBulkUpdatesRelationalTestBase.cs: Evaluated as low risk
This PR changes ExecuteUpdate to accept
Func<SetPropertyCalls<TSource>, SetPropertyCalls<TSource>>
instead ofExpression<Func<SetPropertyCalls<TSource>, SetPropertyCalls<TSource>>>
. This allows mainly for easy dynamic composition of setters (but has other advantages), and is more in-line with how LINQ operators generally work.Func
; so thisFunc
must be evaluated immediately, and its results (which are a set of property/value selector pairs) integrated into the tree.SetProperty()
calls and actually evaluate them, just as the ExecuteUpdate operator implementation does for non-precompilation.Closes #32018