Create a node with a label using Neo4jClient in f #

I am trying to create a node as well as assign a label to this node. Following the instructions in Using Neo4j Graph DB with F # , I managed to create Person nodes, but I could not create a Person shortcut for the node created. Is using the create method incorrect? Do I need to pass it as a parameter? Can I use Cypher creation instead of create?

+4
source share
1 answer

This example uses the old API based on the use of "Create", so you used:

client.Create person

Now you can (and should) use the Cypher version:

let createPerson person =
    client.Cypher
        .Create("(p:Person {param})")
        .WithParam("param", person)
        .Return<Person>("p")
        .Results
        .Single();

let pA = createPerson { Name = "PersonA"; Twitter = "tA" }

. Cypher - db.

+8

All Articles