Change ExecuteUpdate to accept non-expression lambda#35257
Merged
roji merged 1 commit intodotnet:mainfrom Jan 11, 2025
Merged
Conversation
879c7e5 to
f378a22
Compare
Member
Author
|
@ajcvickers this should be ready if you want to take a look. |
f378a22 to
b882a4e
Compare
Member
Author
|
/azp run |
|
No pipelines are associated with this pull request. |
Member
Author
|
/azp run |
|
No pipelines are associated with this pull request. |
Member
Author
|
@AndriySvyryd any idea why this PR refuses to build (I'm seeing this happening with other open PRs at the moment)? |
Member
Probably an AZDO outage |
Member
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
There was a problem hiding this comment.
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
AndriySvyryd
approved these changes
Jan 11, 2025
b882a4e to
aeeb86d
Compare
This was referenced Jan 12, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 thisFuncmust 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
Closes #35361