How to order by a projection? #1276
ethanshattuck
started this conversation in
General
Replies: 1 comment 1 reply
-
You can select a tuple item in a |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The documentation states that you can name a projection like so:
var dynamics = await _g .V<Person>() .Project(b => b .ToDynamic() .By(person => person.Name) .By( "count", __ => __ .Cast<object>() .Out<Owns>() .OfType<Pet>() .Count()));
I would like to get all people back in descending order based on their count. How can I reference the "count" projection when ordering?
.Order(o => o.By("count")).ToArrayAsync(); //assuming something like this?
Beta Was this translation helpful? Give feedback.
All reactions