Check why we avoid parameterizing indexer method parameters in the funcletizer
- Dominant language
- C#
- Stars
- 14.8k
- Forks
- 3.4k
- PR merge metrics
- PR metrics pending
Description
We have the following code in [ExpressionTreeFuncletizer](https://github.com/dotnet/efcore/blob/main/src/EFCore/Query/Internal/ExpressionTreeFuncletizer.cs#L2112):
```c#
private bool IsParameterParameterizable(MethodInfo method, ParameterInfo parameter)
=> parameter.GetCustomAttribute() is null
&& !_model.IsIndexerMethod(method);
```
... which means that we constantize arguments to what we identify as indexers (also not sure why the model needs to be involved in determining that something is an indexer...).
For example, this prevents parameters from being parameterized when using the PostgreSQL hstore type, which maps to `Dictionary` (see https://github.com/npgsql/efcore.pg/pull/3285#discussion_r1767499647).
Contributor guide
Assessment
This issue has not been assessed yet.