如何在 Neo4jClient 中多次使用 WithParam?

how to use WithParam more than once in Neo4jClient?

你好,我想在一行查询中使用两个参数,请参阅下面的示例查询,

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

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

您可以调用 .WithParam() 2x,例如:

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

或使用.WithParams:

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

两者之间没有性能差异。