Net.Graph.Neo4JD.Node.Delete C# (CSharp) Method

Delete() public method

public Delete ( ) : void
return void
        public override void Delete()
        {
            if (this.GetLocation() == null || this.Id <= 0)
                throw new Exceptions.InvalidNodeException();

            _nodeRepo.Delete(this);
        }

Usage Example

示例#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);
        }
All Usage Examples Of Net.Graph.Neo4JD.Node::Delete