public Relationship CreateRelationship(ConnectionElement connection, Node startNode, Node endNode, string name, Properties properties) { string response; var status = Neo4jRestApi.CreateRelationship(connection.DbUrl, startNode.Id, endNode.Id, name, properties.ToString(), out response); if (status != HttpStatusCode.Created) { throw new Exception(string.Format("Error creating relationship (http response:{0})", status)); } return(ParseRelationshipJson(response).First()); }
public Relationship CreateRelationship(Node startNode, Node endNode, string relationshipType, Properties properties) { string response; var status = Neo4jRestApi.CreateRelationship(DbUrl, startNode.Id, endNode.Id, relationshipType, properties == null ? null : properties.ToString(), out response); if (status != HttpStatusCode.Created) { throw new Exception(string.Format("Error creationg relationship on node (node id:{0} http response:{1})", Id, status)); } return(RestRelationshipStore.ParseRelationshipJson(response).First()); }