public ActionResult <string> Get2(int resourceid) { var results = client.client.Cypher .Match("(Re:Resource)") .Where((Resource Re) => Re.ResourceId == resourceid) .Return(Re => Re.As <Resource>()) .Results; return(Ok(results)); }
public async Task <IActionResult> GetResourceById(int resourceId) { var resourceResult = await client.client.Cypher .Match("(Re:Resource)") .Where((Resource Re) => Re.ResourceId == resourceId) .Return(Re => Re.As <Resource>()) .ResultsAsync; return(Ok(resourceResult)); }