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); }
public Relationship GetRelationship(Uri uri) { var result = _graphRequest.Post(RequestType.GET, uri, null); Relationship relationship = new Relationship(result); return relationship; }
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; }