Neo4jClient Returns NodeReference from a cypher request

I have a request:

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

This returns me all the nodes that match a query of type User. How to fulfill the same request, but return NodeReferences for each of these agreed users?

+4
source share
2 answers

Using:

 .Return<Node<User>>("x") 

and it will return a Node that has a Reference property.

+4
source

Using:

 .Return(n => n.Id) 

This function exists only from the latest versions of neo4jclient (06/2013)

0
source

Source: https://habr.com/ru/post/1438220/


All Articles