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 query using contains and filter by an array of values.
Finding the needle works as expected
var needle = "John";
collection.Where( x => x.Names.Contains(needle) ).ToListAsync();
How do I find multiple needles?
var needles = new[]{"John","Steve"};
collection.Where( x => x.Names.Any( y => needles.Contains(y)) ).ToListAsync();
Basically I want to find records where the two array values intersect.
But I get the following error: Unable to cast object of type 'System.Linq.Expressions.InstanceMethodCallExpression1' to type 'System.Linq.Expressions.BinaryExpression'.
Thoughts?
The text was updated successfully, but these errors were encountered:
Hi @slorello89,
I'm trying to query using contains and filter by an array of values.
Finding the needle works as expected
How do I find multiple needles?
Basically I want to find records where the two array values intersect.
But I get the following error: Unable to cast object of type 'System.Linq.Expressions.InstanceMethodCallExpression1' to type 'System.Linq.Expressions.BinaryExpression'.
Thoughts?
The text was updated successfully, but these errors were encountered: