如何让 Neo4JClient 执行批量插入

How to get Neo4JClient to perform a bulk insert

当 运行 以下代码出现异常时 "CypherTypeException: Collections containing mixed types can not be stored in properties." - 我做错了什么,需要更改什么才能使其正常工作?

        var wordObjs = new List<object>();
        foreach (string word in WordGroups.GetAllWords())
        {
            wordObjs.Add(new { Value = word});
        }
        GraphClient.Cypher
            .Create("(word:Word {words})")
            .WithParam("words", new { words = wordObjs})
            .ExecuteWithoutResults();

一个解决方案是使用混凝土 class

private class Value { 
    public string Value {get;set;} 
}

并改用 new List<Value>(),我认为客户对您的 List.

的匿名性质有疑问