I'm constructing a Dynamic LINQ query like this:
"Guid=Guid(\"" + entityId + "\")"
This is eventually passed into a .Where()
query, somewhere in the code that I call.
I'm getting this error:
ParseException: '.' or '(' expected
This seems to be because it doesn't find the Guid
property, but rather the Guid
function.
How can I query on the Guid
property of my object?
Guid
is indeed a keyword. You can escape keyword identifiers by prefixing them with@
.The correct expression looks like this: