コード例 #1
0
        public IEnumerable <Relationship> GetRelationship(ConnectionElement connection, string indexName, string searchQuery)
        {
            string response;
            var    status = Neo4jRestApi.GetRelationship(connection.DbUrl, indexName, searchQuery, out response);

            if (status != HttpStatusCode.OK)
            {
                throw new Exception(string.Format("Index not found in (index:{0})", indexName));
            }

            return(ParseRelationshipJson(response));
        }
コード例 #2
0
        public Relationship GetRelationship(ConnectionElement connection, long relationshipId)
        {
            string response;
            var    status = Neo4jRestApi.GetRelationship(connection.DbUrl, relationshipId, out response);

            if (status == HttpStatusCode.NotFound)
            {
                throw new RelationshipNotFoundException(string.Format("Relationship({0})", relationshipId));
            }

            return(CreateRelationshipFromJson(response));
        }