0
votes

I have some nodes of type User that are attached to the root node like so

 var node = _graphClient.Create(new User{Name= "Bob}, new UserBelongsTo(_graphClient.RootNode));

I would like to perform a query that will return all users that are connected to the root node. How do I do this using the neo4jClient?

1

1 Answers

0
votes

Here is what I've come up with so far:

     var results = new CypherFluentQuery(_client)
           .Start("n", _client.RootNode)
           .Match(string.Format("(n)-[:{0}]-(x)", UserBelongsTo.TypeKey))
           .Return<Node<User>>("x")
           .Results;

Note: This is a beginners take on the issue.