asp.net-core - 如何在 .net core API 中编写 Cypher 查询
问题描述
我有一个这样的密码查询
MATCH (n: learningPaths)
WHERE any(x IN n.modules WHERE x = "any course")
RETURN n
如何在 .net 核心 API 中编写此查询以获取结果
以前我有这样的查询
MATCH (n:learningPaths)-[]->(m:modules)
WHERE m.id = "any course"
RETURN n;
我在 .net 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>());
推荐阅读
- google-maps - Xamarin android:IllegalStateException:使用 newLatLngBounds(LatLngBounds,int)时出错:应用填充后视图尺寸太小
- python - 合并多个工作簿和工作表时出错
- javascript - 无法在反应中正确洗牌
- c# - (私有静态引用与私有引用)性能
- python - 如何从 Python 连接 GCP Composer Airflow 的元数据数据库?
- java - 如何使用 Java 从多台计算机查询远程云数据库?
- javascript - 允许在 react-select 中创建重复值
- arrays - Matlab上矩阵展开的逆过程
- git - 如何设置相对于 Doxyfile 的 INPUT?
- spring - 尝试创建 Spring Boot Netflix eureka 服务器时出错