Fix client-side evaluation for string comparison queries - #2053
Closed
SiberaIndustries wants to merge 1 commit into
Closed
Fix client-side evaluation for string comparison queries#2053SiberaIndustries wants to merge 1 commit into
SiberaIndustries wants to merge 1 commit into
Conversation
xuzhg
approved these changes
Mar 10, 2020
mikepizzo
approved these changes
May 21, 2020
mikepizzo
left a comment
Contributor
There was a problem hiding this comment.
@KanishManuja-MS is verifying with the EF team that this is the right solution. As long as they ack, I'm fine with the fix -- thanks @SiberaIndustries!
xuzhg
pushed a commit
that referenced
this pull request
May 22, 2020
Member
|
Merged at: 63f1c66 |
xuzhg
pushed a commit
that referenced
this pull request
May 29, 2026
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.
Issues
This pull request fixes issue #2043 and fixes issue #2078.
Description
Entity Framework Core 3.0 throws an exception when the framework can't translate a linq expression to SQL (called: client-side evaluation).
This PR fixes the special case of string comparisons. EF Core can translate
string.Compare(string, string)to SQL but it can't translate any overload ofstring.Compare. This is why theStringComparisonargument gets removed.Checklist (Uncheck if it is not completed)
Additional work necessary
If documentation update is needed, please add "Docs Needed" label to the issue and provide details about the required document change in the issue.