我正在尝试从c#codeBehind获取给定节点的FOAF节点。密码是
MATCH (current { PRSN_F_Name: 'MyName' })-[:KNOWS*1..2]->(fof)
WHERE NOT (current)- [:KNOWS]->(fof)
RETURN fof.PRSN_F_Name
如何使用C#实现此查询?
答案 0 :(得分:0)
行
我自己找到了答案......它必须如下:
var q = client.Cypher
.Match("(current { PRSN_F_Name: '" + txtName.Text + "' })-[:KNOWS*1..2]->(fof)")
.Where("NOT (current)-[:KNOWS]->(fof)")
.Return((fof) => fof.As<Person>());
foreach (var result in q.Results)
{
ltrFeedback.Text = ltrFeedback.Text + result.PRSN_F_Name + "<br>";
}