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
I'm trying to create an in clause query using dynamic linq. I tried:
dbSet<T>.AsQueryable().Where($"Key in @0", keys);
And I got this error:
An exception of type 'System.InvalidOperationException' occurred in System.Linq.Expressions.dll but was not handled in user code: 'No generic method 'Contains' on type 'System.Linq.Enumerable' is compatible with the supplied type arguments and arguments. No type arguments should be provided if the method is non-generic. '
No exception, but I got this translation, which is wrong:
AND (h.Key IS NOT NULL AND ((LOCATE(h.Key, 'pump') > 0) OR (h.Key LIKE '')))
Unfortunately, your documentation does not have examples related to how to generate the in clause. And these erroneous codes are proposed by AI (ChatGPT and Gemini).
I did not create an MRE (minimally reproducible example) because it's all about docs. Please add some examples to the docs. Thank you.
The text was updated successfully, but these errors were encountered:
I'm trying to create an
in clause
query using dynamic linq. I tried:And I got this error:
I tried:
And I got the same error. Please note that
values
is an array of keys:Then I tried:
No exception, but I got this translation, which is wrong:
Unfortunately, your documentation does not have examples related to how to generate the
in clause
. And these erroneous codes are proposed by AI (ChatGPT and Gemini).I did not create an MRE (minimally reproducible example) because it's all about docs. Please add some examples to the docs. Thank you.
The text was updated successfully, but these errors were encountered: