You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#30426 is adding support for queryable constant/parameter collections, including a Contains translation that can take advantage of e.g. OPENJSON to avoid query plan cache pollution (instead of using IN with constant expansion).
One case which was specifically excluded in #30426 is entity contains, e.g. Where(b => blogs.Contains(b)), Where(b => new Blog[] { ... }.Contains(b) (see e.g. tests List_Contains_with_constant_list, List_Contains_with_parameter_list). This was done by refraining to convert constant/parameter collections to query roots in preprocessing when their CLR type corresponds to an entity in the model. This means that this specific construct still uses IN with constant expansion.
The main difficulty with this was #30711, which makes it problematic to pattern-match the parameter case in relational.
The text was updated successfully, but these errors were encountered:
Edit: I was hoping #31369 covers this, but it seems that didn't make it into 8.0-rc1/only works on complex properties, not complex parameter collections.
@bachratyg not yet, unfortunately... EF 8.0's new complex type support does not yet include any sort of collection support - we simply did not have enough time to implement that. The plan is to hopefully complete that for 9.0 (#31237), and that would include arbitrary querying of collections of complex types as above (though the exact way this would work is still TBD).
#30426 is adding support for queryable constant/parameter collections, including a Contains translation that can take advantage of e.g. OPENJSON to avoid query plan cache pollution (instead of using IN with constant expansion).
One case which was specifically excluded in #30426 is entity contains, e.g.
Where(b => blogs.Contains(b))
,Where(b => new Blog[] { ... }.Contains(b)
(see e.g. tests List_Contains_with_constant_list, List_Contains_with_parameter_list). This was done by refraining to convert constant/parameter collections to query roots in preprocessing when their CLR type corresponds to an entity in the model. This means that this specific construct still uses IN with constant expansion.The main difficulty with this was #30711, which makes it problematic to pattern-match the parameter case in relational.
The text was updated successfully, but these errors were encountered: