Skip to content

Commit

Permalink
Use StringComparer.OrdinalIgnoreCase.GetHashCode
Browse files Browse the repository at this point in the history
  • Loading branch information
ajcvickers committed Jan 4, 2023
1 parent f577e1a commit aa2dfae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/EFCore/ChangeTracking/CaseInsensitiveValueComparer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public class CaseInsensitiveValueComparer : ValueComparer<string?>
public CaseInsensitiveValueComparer()
: base(
(l, r) => string.Equals(l, r, StringComparison.OrdinalIgnoreCase),
v => v == null ? 0 : v.ToUpper().GetHashCode())
v => v == null ? 0 : StringComparer.OrdinalIgnoreCase.GetHashCode(v))
{
}
}

0 comments on commit aa2dfae

Please sign in to comment.