-
-
Notifications
You must be signed in to change notification settings - Fork 228
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question: No generic method 'Contains' on type 'System.Linq.Enumerable #178
Comments
wrong type of list. |
I'm having this exact same issue using both approaches: var predicate = "@0.Contains(instrumentId)";
var list = new List<int> { 1, 2 };
var expression = DynamicExpressionParser.ParseLambda<T, bool>(null, false, predicate, list);` // errors here
queryable = querable.Where(expression); or queryable = queryable.Where("@0.Contains(instrumentId)", new List<int> { 1, 2 }); Can you see anything I'm doing wrong? Message: "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. " |
Looked at this for a few hours and solved it minutes after posting the above - typical 😆 My issue is that my underlying type is a nullable int, so changing my list to this fixed it :) var list = new List<int?> { 1, 2 }; |
Hi
I have the following issue:
The code that I'm trying to run:
I saw in other issues that the following code runs without any issues:
What am I missing?
The text was updated successfully, but these errors were encountered: