Hell all!
I tried all known variations to filter with Contains
, but so far no luck.
METHOD #1
ret = ret.Where("CaseID.Contains(@0)", {15, 16, 17})
Gets the following error:
System.Linq.Dynamic.ParseException: 'No applicable method 'Contains' exists in type 'Int32?''
METHOD #2
ret.Where("@0.Contains(outerIt.CaseID)", {15, 16, 17})
Bring the following error:
System.Linq.Dynamic.ParseException: 'No 'it' is in scope'
So, how can i filter by a list or array?
I'm using the latest System.Linq.Dynamic library in nuget 1.0.7
the following will work, but you must to ensure that the
CaseID
and the array values have the same Type.ret.Where("@0.Any(outerIt.CaseID=it)", array)