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

CreateRelationshipTo() public method

public CreateRelationshipTo ( Node node, string relationShipType ) : Relationship
node Node
relationShipType string
return Relationship
        public Relationship CreateRelationshipTo(Node node, string relationShipType)
        {
            if ((this.GetLocation()==null) || (node.GetLocation()==null))
                throw new Exception("Parent or child node is not created. Create both node before creating the relation");

            Relationship relationShip = new Relationship(this, node, relationShipType);
            return _relationShipRepo.CreateRelationship(this, relationShip);
        }