Skip to content

Conversation

@cincuranet
Copy link
Contributor

@cincuranet cincuranet commented Nov 28, 2025

Fixes #37204.

Description

In EF 10 we improved support for primitive collections. We incorrectly assumed that every primitive collection single parameter (using i.e. OPENJSON as a translation) is going to be IList, 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.Parameter or UseParameterizedCollectionMode(ParameterTranslationMode.Parameter) with IEnumerable fail 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.

@cincuranet cincuranet requested a review from a team as a code owner November 28, 2025 12:06
@cincuranet cincuranet added this to the 10.0.2 milestone Nov 28, 2025
Copy link
Member

@roji roji left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks OK for the patch, but see #37255 (comment).

@cincuranet
Copy link
Contributor Author

Looks OK for the patch, but see #37255 (comment).

Created #37267 for it.

@cincuranet cincuranet requested a review from artl93 December 1, 2025 17:55
@cincuranet
Copy link
Contributor Author

cc @artl93

Copy link
Member

@artl93 artl93 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Customer reported. Regression. Straightforward fix with ability to quirk.

@cincuranet cincuranet merged commit 770a84e into dotnet:release/10.0 Dec 2, 2025
7 checks passed
@cincuranet cincuranet deleted the parameter-list-10 branch December 2, 2025 18:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

EF.Parameter or setting ParameterTranslationMode.Parameter doesn't work with IEnumerable with nullable type

5 participants