Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
03-18-2021 12:06 PM
Hi Tribe,
I am trying to get this Cypher query to work in the .net GraphClient but I am getting back the error: "Input string was not in a correct format"
Avatar avatar =
GraphClient.Cypher.Match("(p:Avatar {Username: {nameParam}})") //TODO: Need to add password to match query...
.WithParam("nameParam", username)
.Return(p => p.As())
.ResultsAsync.Result.Single();
Any ideas? 🙂
I also have this for the Save method for creating or updating, it runs the create code with no errors but nothing is added to the DB?
public override IAvatar SaveAvatar(IAvatar avatar)
{
if (avatar.Id == Guid.Empty)
{
avatar.Id = Guid.NewGuid();//_graphClient.Cypher // .Unwind(persons, "person") // .Merge("(p:Person { Id: person.Id })") // .OnCreate() // .Set("p = person") // .ExecuteWithoutResults(); GraphClient.Cypher .Merge("(a:Avatar { Id: avatar.Id })") //Only create if doesn't alreadye exists. .OnCreate() .Set("a = avatar") //Once created, set the properties. .ExecuteWithoutResultsAsync(); } else { GraphClient.Cypher .Match("(a:Avatar)") .Where((Avatar a) => a.Id == avatar.Id) .Set("a = avatar") //Set the properties. .ExecuteWithoutResultsAsync(); } return avatar; }
Any ideas? I'm a noob so any help would be really appreciated thanks!
Cheers
D.
04-06-2021 08:09 AM
Anyone? Thanks.
All the sessions of the conference are now available online