New method overloads added to System.Linq.Queryable #23421
Labels
breaking-change
Indicates a .NET Core breaking change
🏁 Release: .NET 6
Issues and PRs for the .NET 6 release
doc-idea
Indicates issues that are suggestions for new topics [org][type][category]
Pri1
High priority, do before Pri2 and Pri3
New method overloads added to System.Linq.Queryable
We have added new public method overloads to System.Linq.Queryable as part of the new features implemented in dotnet/runtime#47231. This is known to break query provider implementations whose reflection code isn't sufficiently robust when looking up methods (cf. dotnet/efcore#24002, dotnet/runtime#49683).
Version introduced
6.0
Old behavior
The following code snippet executes successfully:
New behavior
The above code snippet now throws the exception:
Reason for change
Extending the LINQ queryable API with new overloads.
Recommended action
Query provider library authors are advised to ensure that their reflection code is tolerant of method overload additions, e.g. by using a
Type.GetMethod()
overload that explicitly accepts the method's parameter types.Category
LINQ
Affected APIs
New overloads have been added for the following queryable extension methods:
ElementAt
/Take
Min
/Max
FirstOrDefault
/LastOrDefault
/SingleOrDefault
.Zip
Issue metadata
The text was updated successfully, but these errors were encountered: