[release/10.0] Fix Parameter for primitive collections for IEnumerable with nullable type#37257
Merged
cincuranet merged 1 commit intodotnet:release/10.0from Dec 2, 2025
Merged
Conversation
roji
approved these changes
Nov 29, 2025
Member
roji
left a comment
There was a problem hiding this comment.
Looks OK for the patch, but see #37255 (comment).
Contributor
Author
SamMonoRT
approved these changes
Dec 1, 2025
Contributor
Author
|
cc @artl93 |
artl93
approved these changes
Dec 2, 2025
Member
artl93
left a comment
There was a problem hiding this comment.
Customer reported. Regression. Straightforward fix with ability to quirk.
This was referenced Dec 2, 2025
PashaPash
added a commit
to PashaPash/efcore
that referenced
this pull request
Jan 20, 2026
… introduced in dotnet#37257 - Checking for IEnumerable<T> before IEnumerable - Using generic ToList() to preserve collection element type - processedValues should now have the same element type as the input collection (as was before dotnet#37257) Fixes dotnet#37537
6 tasks
PashaPash
added a commit
to PashaPash/efcore
that referenced
this pull request
Feb 3, 2026
… introduced in dotnet#37257 - Checking for IEnumerable<T> before IEnumerable - Using generic ToList() to preserve collection element type - processedValues should now have the same element type as the input collection (as was before dotnet#37257) Fixes dotnet#37537
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.
Fixes #37204.
Description
In EF 10 we improved support for primitive collections. We incorrectly assumed that every primitive collection single parameter (using i.e.
OPENJSONas a translation) is going to beIList, which is incorrect in case the collection is i.e. filtered inline in query (Where(x => collection.Where(...).Contains(x.Id))).Customer impact
Queries using
EF.ParameterorUseParameterizedCollectionMode(ParameterTranslationMode.Parameter)withIEnumerablefail to translate, forcing customer to rewrite queries.How found
Customer reported on 10.0.
Regression
Yes.
Testing
Tests added.
Risk
Low. This is targeted fix. Quirk added.