DotNet4Neo4j / Neo4jClient

.NET client binding for Neo4j
https://www.nuget.org/packages/Neo4jClient
Microsoft Public License
431 stars 146 forks source link

return multiple and JsonProperty / JsonPropertyName #434

Open zweistein22 opened 2 years ago

zweistein22 commented 2 years ago

Having a simple query:

`var query = client.Cypher .Match("(u:User {Sub: $sub})-[r:"+relationName+"]->(q:Query)") .WithParam("sub",user.Sub) .With("r,q") .OrderByDescending("r.Time") .Return((q,r) => new QueryHistoryReturn() { Query = q.As(), RelationParams = r.As() });

will return an empty Query object if Query is defined like this:

public class Query { [System.Text.Json.Serialization.JsonPropertyName("text")] [Newtonsoft.Json.JsonProperty(PropertyName = "text")] public string Text { get; set; } } `

Once I comment the the JsonProperty Attributes the above query returns the correct values. Is this a bug?

P.S. Editor removes some symbols like "<"