Neo4jClient: How to deserialize a collect result to a c# class -
I have a query where I need only the name and the name of the archive back to reduce network traffic. What do I want to get from the database with the following part of the query
ShipTocities = Return AS & lt; IEnumerable & lt; String & gt; & Gt; The issue is that I withdraw data like this: < Code> [["IN.KA.MANG", "Mangalore"], ["INA K.A.M.G.", "Mangalore"], ["INK Bang", "Bangalore"]]
But how can I map it like a C # object
public square CityFound {public string CityId {get; Set; } Public String CityName {get; Set; }}
Is there any way to use some converter without me to use some ugly string manipulation?
UPDATE 1:
Actually my query is quite complex and the only way to get data that I can think is to lower To assign a query to:
// The selected below is a complex query based on user selection ... Loading Loading ... var query = selectedLoadQuery Match ("(load) - [: SHIPPED_BY] - - (Shipar) - [R: HAS_TRANSPORTER] -> (transporter)" ("P = (for ship: city) and lieutenant; - [: SHIP_FROM_CITY] - (Load) - [: SHIP_TO_CITY] - & gt; ("P = (Ship = Transporter, Shipar, User, Gale (separate as Miclicares)". (By ship: City) "). (" P Returns (Load, Shipfrom, Shipto) => New {TotalShipments = load.CountDistinct (), Semiquians = Return. »Long & gt; (" Michael "," Load, Shipto, Shipto, Transporter, Michaels "). ), ShipFromTits = Returns. Lt; IEnumerable & lt; string & gt; & gt; ("Collect ([Ship Firm. Eternal id, shipfrom .nom])", ShipTocities = Return.exe & lt; IEnumerable & lt; string & gt; Gt; ("collection (ship [inhalation ship, underlying id, shiptom .name]]"}});
Regards ray
You do not need to do this constructive. You are only going to this issue because you are preparing a complex query that is the structure of the data Justify The Purchaser.
Create a class that is in the node:
public class shippingDistribution {public long internal commands {received; Set; } Public string name {get; Set; }}
Use this to lighten the following syntax in your return
statement:
var cities = graphClient . Match (...). Return (ShipTou => New {ID} = Shantown. AAT; Shipping Distanction> (). InternalId, Name = Shiptao. AAT; Shipping Distanction & gt; (). Name,}). result;
Comments
Post a Comment