Skip to content

Commit fdb8dab

Browse files
committed
Update ExpressionBuilder.cs
1 parent 44c7204 commit fdb8dab

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src/GraphQL.EntityFramework/Where/ExpressionBuilder.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,12 @@ static Expression MakeIdPredicateBody(string path, string[] values)
128128
return MakeStringListInComparison(values, property);
129129
}
130130

131-
return MakeObjectListInComparision(values, property);
131+
// Attempt to convert the string values to the object type
132+
var objects = TypeConverter.ConvertStringsToList(values, property.Info);
133+
// Make the object values a constant expression
134+
var constant = Expression.Constant(objects);
135+
// Build and return the expression body
136+
return Expression.Call(constant, property.SafeListContains, property.Left);
132137
}
133138
catch (Exception exception)
134139
{

0 commit comments

Comments
 (0)