Closed PavelPikat closed 7 years ago
try db.CreateStatement:
var articles = db.CreateStatement<Article>("FOR u IN People FILTER u.Name == @name FOR g IN OUTBOUND u MEMBER_OF FOR a IN INBOUND g CHILD_OF RETURN a", new List<QueryParameter>() { new QueryParameter() { Name = "name", Value = "Bob" } }).ToList();
@kwrang Great example! Thank you very much, it works like a charm! :+1:
@PavelPikat i'm planning to add AQL OUTBOUND
and INBOUND
keywords for LINQ in v3.0 branch this month.
@PavelPikat graph traversal in LINQ is now supported
AQL traversal doc https://docs.arangodb.com/3.0/AQL/Graphs/index.html
LINQ traversal examples https://github.com/ra0o0f/arangoclient.net/blob/next/src/ArangoDB.Client.Examples/Linq/TraversalQuery.cs
see if you can write you query in AQL with new graph traversal syntax
I am new to ArangoDB and I find it hard to write complex queries with LINQ, and would like to execute queries in clean AQL. How can it be done within this library?
For example, I want to retrieve all articles that belong to groups current user is member of. My LINQ query looks like
And my AQL looks like: