4

I have a query:

 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 of the nodes that match the query of type User. How would I perform the same query but return the NodeReferences for each of those matched Users?

Aran Mulholland
  • 23,555
  • 29
  • 141
  • 228

2 Answers2

4

Use:

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

and it will return the Node which has a Reference property.

Aran Mulholland
  • 23,555
  • 29
  • 141
  • 228
0

Use:

.Return(n => n.Id)

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

Gil Stal
  • 3,354
  • 4
  • 29
  • 32