Does DocumentDb supports multipe OrderBy and ThenBy ? I have been using this query with both approaches including two OrderBy and one orderBy and one ThenBy but every time it says ThenBy is not supported. Is there any way to use order by with multiple fields?
var Rests=from f in _client.CreateDocumentQuery<Restraunt>(_collectionUri) orderby f.RestName,f.RestId select f;
var Rests=from f in _client.CreateDocumentQuery<Restraunt>(_collectionUri)
.OrderBy(f.RestName).ThenBy(f.RestId);
Is there any way to use order by with multiple fields?
Not at the moment, no. It's a documented limitation, although it sounds like work is being done on it:
You cannot perform the following:
- [...] Order By multiple properties (coming soon).
See more on this question at Stackoverflow