I am trying to send a list of strings to Neo4j using Neo4jClient to be used in a FOREACH cypher loop. The problem I am facing is that instead to creating different nodes for each string , the program creates just one node with the property Name set as the complete comma separated list.
The Code I am Using :
GraphClient graphClient = new GraphClient(new Uri("http://neo4j:a@localhost:7474/db/data"));
graphClient.Connect();
graphClient.Cypher
.With("[{listTags}] AS T1")
.ForEach("( n in T1| Merge (p: NPT {Name: n})")
.OnCreate().Set("p.Mod =0")
.OnMatch().Set("p.Mod = 0)")
.WithParams(new { listTags = ResultString })
.ExecuteWithoutResults();