Ejemplo n.º 1
0
        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));
        }
Ejemplo n.º 2
0
        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));
        }