Inheritance: Net.Graph.Neo4JD.BaseEntity
Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
 public Relationship GetRelationship(Uri uri)
 {
     var result = _graphRequest.Post(RequestType.GET, uri, null);
     Relationship relationship = new Relationship(result);
     return relationship;
 }
Exemplo n.º 3
0
 public Relationship CreateRelationship(Node parent, Relationship relationShip)
 {
     var result = _graphRequest.Post(RequestType.POST, new Uri(string.Concat(parent.GetLocation(), @"/relationships")), relationShip.GetProperties());
     relationShip.SetLocation(result.GetLocation());
     return relationShip;
 }