Skip to content

Enable EF.Parameter for forcing parameterization of collection parameters #34345

@roji

Description

@roji

#34344 will allow users to configure whether parameterized collections should parameterized by default (e.g. via OPENJSON, this is the current default), or constantized (as Contains did before 8.0); we are also considering changing the default mode back to constantization in 10.

If users choose to default to constantization, there should be a way to specify for specific collections of specific queries that they should be constantized. EF.Parameter was already introduced in 8.0 (#28151) as a way to force parameterization even when the query contains a constant; this can be useful for some scenarios of dynamic query tree construction, as well as F# where captured variables are always constantized.

We should make EF.Parameter also cause the parameterization of collection parameters, similar to how EF.Constant can cause them to get constantized.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions