neo4j - "Cannot convert lambda expression to type 'string' because it is not a delegate type" Neo4jClient Query -
i trying put clause in neo4j cypher query return nodes, query im trying perform:
start n = node:node_auto_index(name = "contact details") match (n)--(x) x.type = "version" return x; now c# method looks this(using neo4jclient):
public ienumerable<node<versionnode>> graphgetallversionnodes(string nodename) { clientconnection = graphoperations.graphgetconnection(); ienumerable<node<versionnode>> queryresult = null; var query = clientconnection .cypher .start(new { n = node.byindexlookup("node_auto_index", "name", nodename) }) .match("(n)--(x)") .where((versionnode x) => x.type = "version") .return<node<versionnode>>("(x)") .results; queryresult = query.tolist(); return queryresult; } now there error on clause saying:
cannot convert lambda expression type 'string' because not delegate type what doing wrong here?
thanks
if that's verbatim copy-paste, i'm guessing issue wrote:
.where((versionnode x) => x.type = "version") when need write:
.where((versionnode x) => x.type == "version") ps. what's point of ienumerable<node<versionnode>> queryresult = null; instead of var queryresult =? never assign in other path, it's waste of code , signature maintain.
Comments
Post a Comment