本文介绍了如何在 core API 中编写 Cypher 查询的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个类似的 Cypher 查询
I have a Cypher query like that
MATCH (n: learningPaths) WHERE any(x IN n.modules WHERE x = "any course") RETURN n如何在 core API 中编写此查询以获取结果
How can I write this query in core API to get the results
以前我有这样的查询
MATCH (n:learningPaths)-[]->(m:modules) WHERE m.id = "any course" RETURN n;我在下面用 core API 写
and I write below in core API
var result = ( await _graphClient.Cypher .Match(@"(n:learningPaths)-[]->(m:modules)") .Where<modules>(m => m.id == "any course") .Return((n)=> n.As<learningPaths>()) .ResultsAsync) .ToList(); 推荐答案你有没有试过这样做:
var query = client.Cypher .Match("MATCH (n:learningPaths)-->(m:modules)") .Where("any(x IN n.modules WHERE x = 'any course')" .Return( n => n.As<learningPaths>());更多推荐
如何在 .net core API 中编写 Cypher 查询
发布评论