如何在Neo4jClient中多次使用WithParam?

时间:2018-08-13 08:49:58

标签: neo4j cypher neo4jclient

您好,我想在一行查询中使用两个参数,请参见向下查询示例,

client.cypher.Match("(p:Person)")
             .Where("NOT (p)-[:KHOWS]-(:Person {Id:{param}})-[:HAS_PROFILE]-(:Profile {Id:{param2}})")

现在如何在一行中同时对两个参数使用WithParam()

1 个答案:

答案 0 :(得分:0)

您可以致电.WithParam() 2次,例如:

.WithParam("Param1", xx)
.WithParam("Param2", yy)

或使用.WithParams

.WithParams(new {
    param1 = xx,
    param2 = yy
})

两者之间没有性能差异。