如何在 .net core API 中编写 Cypher 查询

编程入门 行业动态 更新时间:2024-10-27 10:33:45
本文介绍了如何在 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 查询

本文发布于:2023-11-14 16:44:05,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1587990.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:如何在   net   core   API   Cypher

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!