尝试使用Core App中的新Neo4jClient保存到neo4j DB

问题描述 投票:0回答:1

我正在使用https://www.nuget.org/packages/Neo4jClient/4.0.0.1-prerelease中的新neo4j客户端,现在我想使用类似https://github.com/Readify/Neo4jClient/wiki/cypher-examples中的参数>

在我的C#应用​​程序中,尝试保存新的节点Person with:

    private async Task CreatePerson(IGraphClient client, params Person[] persons)
    {
            client.Cypher
            .Unwind(persons, "person")
            .Merge("(p:Person { Id: person.Id })")
            .OnCreate()
            .Set("p = person")
            .Return(person => person.As<Person>());
    }

我可以运行查询,但是我没有收到任何数据并且我没有收到任何错误,这里我缺少什么?

谢谢您和最诚挚的问候

UPDATE:

添加的返回语句

我正在使用https://www.nuget.org/packages/Neo4jClient/4.0.0.1-prerelease中的新neo4j客户端,现在我想使用https://github.com/Readify/Neo4jClient/ Wiki / cypher -...

c# neo4j neo4jclient
1个回答
1
投票

您正在使用ExecuteWithoutResultsAsync方法执行查询,该方法不会返回结果(并且您的代码也不会尝试处理该方法的结果)。

© www.soinside.com 2019 - 2024. All rights reserved.