Create() public method

public Create ( ) : Net.Graph.Neo4JD.BaseEntity
return Net.Graph.Neo4JD.BaseEntity
示例#1
0
        public void DeleteNode()
        {
            Node nodeToDelete = new Node();
            nodeToDelete.AddProperty("FirstName", "Delete").AddProperty("LastName", "Node");
            nodeToDelete.Create();
            int id = nodeToDelete.Id;
            Console.WriteLine(nodeToDelete.GetLocation().ToString());

            nodeToDelete.Delete();

            Node accessDeletedNode = Node.Get(id);
            Assert.AreEqual(0, accessDeletedNode.Id);
        }
示例#2
0
        public void CreateSonRelationship()
        {
            Node son = new Node();
            son.AddProperty("FirstName", "Sony");
            son.AddProperty("LastName", "Arouje");
            son.Create();

            Node father = Node.Get(1);
            Assert.IsNotNull(father);
            Assert.IsNotNull(father.GetLocation());
            Console.WriteLine(father.GetLocation().ToString());

            Relationship relationship = father.CreateRelationshipTo(son, "son");
            Assert.IsNotNull(relationship.GetLocation());
        }
示例#3
0
        public void CreateNode()
        {
            Node node = new Node();
            node.AddProperty("FirstName", "Kunjachan");
            node.AddProperty("LastName", "Arouje");
            node.Create();

            Assert.IsNotNull(node.GetLocation());
            Console.WriteLine(node.GetLocation().ToString());

            Node mother = new Node();
            mother.AddProperty("FirstName", "Marry").AddProperty("LastName", "Treassa").Create();
            Assert.IsNotNull(mother.GetLocation());
            Console.WriteLine(mother.GetLocation().ToString());
        }