Quantcast
Channel: Mobile - Couchbase Forums
Viewing all articles
Browse latest Browse all 1122

Orderby on more than one property

$
0
0

@jda wrote:

Hi
I have a query like this:

static readonly IOrdering orderByDate = Ordering.Property("date").Descending()
    :
QueryBuilder.Select(
                    SelectResult.All())
                   .From(dbSource)
                   .Where(_condition)
                   .OrderBy(orderByDate)

If the date attribute is the same then I want creation order to be next order by criteria - similarly to this N1QL query:

select `key`,catchkeys,date,created 
from data 
where type = "FishingTrip" and userkey="2124DEFEC111BA8FC1257ED20034B387" 
order by date desc,created des

I have tried to find the syntax on doing this (and tried to play with the typeahead in VisualStudio) - but I have not found a solution :face_with_monocle:

Does anyone here know how to do that?

Thanks!

Posts: 3

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 1122