我有一个Where子句的问题,不拉出值并将它们作为参数。neo4jclient where子句没有放入参数
return
startingNode
.StartCypher("startNode")
.Match(matchQuery)
.Where<TSourceNode>(otherStartNodes => otherStartNodes.Id != startingNode.Data.Id)
.Return<TSourceNode>("otherStartNodes").Results;
查询字符串中找出来,如 “WHERE(编号<> ID)”。我可以通过不使用lambda表达式,只是用下面的代码,但我很感兴趣,看看它为什么没有工作
.Where("startNode.Id <> otherStartNodes.Id")
我也尝试下面的线很容易地解决这个问题,但没有奏效无论是。
.Where<TSourceNode, TSourceNode>((otherStartNodes, startNode) => otherStartNodes.Id != startNode.Id)
编辑 泰胜 - 我创建了一个问题到位桶这一点。
你是正确的Where子句应该是正确的方式。
.Where<TSourceNode, TSourceNode>((otherStartNodes, startNode) => otherStartNodes.Id != startNode.Id))
当我使用'正确的'时,生成的查询文本产生相同的“Where(Id <> Id)”。这个问题可能是由于TSourceNode是一个泛型类型,它不正确地限定名称?我正在开发的这个项目是开源的,因此我将添加一个测试并通过链接发送给您。干杯。 – Brenton