It looks like you aren't calling .ExecuteWithoutResults()
or .Results
, so nothing will ever actually go to Neo4j.
Look at the full example that you linked to:
var newUser = new User { Id = 456, Name = "Jim" };
graphClient.Cypher
.Create("(user:User {newUser})")
.WithParam("newUser", newUser)
.ExecuteWithoutResults();
If you want to return something, then you need to include that in your Cypher call with a RETURN
clause, and then look at the Results
property:
var newUser = new User { Id = 456, Name = "Jim" };
var createdUser = graphClient.Cypher
.Create("(user:User {newUser})")
.WithParam("newUser", newUser)
.Return(user => user.As<User>)
.Results
.SingleOrDefault();
In this specific example though, that is totally pointless because you will always just return the same node you created.
As for the =
vs :
, that's just a difference of QueryText
vs. DebugQueryText
. Look at QueryText
, because that's the one that actually goes over the wire in the end.