Search code examples
c#graphneo4jneo4jclient

Assigning a label to a created node in Neo4jClient


I want to create some nodes of type Person and Books using Neo4jClient.

To do that, I have class Person like this:

Public Class Person
{
      Public String Name;    
}

To create node, I have written something like this:

Var RefA = client.Create(new Person(){Name ="John"});

(Client -> GraphicClient)

When I saw the created node in Neo4j web interface, no label was assigned to the created node. I thought that Person would be the label. How can I assign a label to the created node using Neo4jClient. I want queries like 'Match(n:Person)' but because no types have been created it is not possible to do that.

Thanks a lot in advance.


Solution

  • This exact scenario is in the documentation: https://github.com/Readify/Neo4jClient/wiki/cypher-examples#create-a-user