這是一個問題的兩個部分無法隱式轉換類型「Neo4jClient.NodeReference <>」到「Neo4jClient.GraphClient」
我得到這個錯誤,當我嘗試創建一個新的節點
無法隱式轉換type'Neo4jClient.NodeReference」到‘Neo4jClient.GraphClient’
我有3個班在這裏 的第一次連接到服務器GraphDB並返回CLIEN在其他類
public GraphClient GetConnection()
{
var client = new GraphClient(new Uri("http://localhost:7474/db/data"));
client.Connect();
return client;
}
以後使用變量t再有就是New_Node類,看起來像這樣
class New_Node
{
public GraphClient Node { get; set; }
}
然後是具有CreateNode方法
public GraphClient CreateNode()
{
Graph_Connection connection = new Graph_Connection();
var NewNode = connection.GetConnection();
var Created_Node = NewNode.Create(new New_Node());
return Created_Node;
}
圖形操作類
如何在另一行代碼上設置節點的屬性,而不是使用節點創建它們,I w螞蟻,使我的應用程序更具活力,因爲這種方式似乎很硬編碼
var refA = client.Create(new Person(){Name =「Person A」});
在Java中一個能做到這一點
Node user1 = this.graphDb.createNode();
user1.setProperty("name", "Mike");