Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
03-22-2021 11:09 AM
Hi Guys,
I posted this in the Cypher category but wasn't sure if it was better to post here because it is using the .NET Graph Client?
Should I re-post it here or is the link above ok?
Any help would be really appreciated thanks.
Cheers
D.
04-06-2021 08:09 AM
Anyone?
04-07-2021 02:39 AM
Have you tried replacing {nameParam}
with $nameParam
? The latter is the parameter syntax for neo4j 4+.
04-13-2021 08:19 AM
Sorry for the late response. With the old parm inclusion syntax you've got two issues.
$
at the beginning of the string for interpolation.{}
that you want sent as part of the cypher.So you'd want this:
GraphClient.Cypher.Match($"(p:Avatar {{Username: {nameParam}}})")
OR if you want to use the recommended neo4j params, which I suspect you're doing with the WithParam
Use $nameParam
GraphClient.Cypher.Match("(p:Avatar {Username: $nameParam})").WithParam("nameParam", username)
Hope that helps!
All the sessions of the conference are now available online