/*End SecondaryConsumers section*/ /* Begin TertiaryConsumers section */ public void PrintTertiaryConsumers(TertiaryConsumers tertiary) { Console.WriteLine("TertiaryConsumerID: " + tertiary.TertiaryConsumerID); Console.WriteLine("Name: " + tertiary.Name); Console.WriteLine("Species: " + tertiary.Species); Console.WriteLine("Features: " + tertiary.Features); Console.WriteLine(new String('-', 20)); }
/// <summary> /// Import the string query statement which you want to retrieve a TertiaryConsumer from /// </summary> public TertiaryConsumers GetTertiaryConsumer(string statement) { TertiaryConsumers tertiary = new TertiaryConsumers(); using (var session = _driver.Session()) { session.WriteTransaction(tx => { var result = tx.Run(statement); var nodeObject = JsonConvert.SerializeObject(result.Select(node => node[0].As <INode>().Properties).First()); tertiary = JsonConvert.DeserializeObject <TertiaryConsumers>(nodeObject); }); } return(tertiary); }