I’m using Neo4j Release 2 with Java SE 7. I’ve reviewed the online C# client examples and still have not been able to accomplish this simple task. Below is my code snippet that most closely follows syntax from examples post here: (https://github.com/Readify/Neo4jClient/wiki/cypher-examples).
My problem is that the query always come back with a count of zero.
In this example, I am trying to test if the node Person with a Name property equal to “Beth” has already been created as a node in my database. In this case I know the node exists as I can query for Beth using Cypher via Neo4j's web browser client.
The var query always come back with a count of zero elements. Why?
string myname = "Beth";
var query = client.Cypher
.Match("(person:Person)")
.Where((Person person) => person.Name == myname)
.Return(person => person.As<Person>())
.Results;
Console.WriteLine(query.Count()); // returns 0