Method SetSortOrder
SetSortOrder(IMongoSortBy)
Sets the sort order for the server to sort the documents by before returning them.
public virtual MongoCursor SetSortOrder(IMongoSortBy sortBy)
Parameters
sortBy
IMongoSortByThe sort order.
Returns
- MongoCursor
The cursor (so you can chain method calls to it).
SetSortOrder(params string[])
Sets the sort order for the server to sort the documents by before returning them.
public virtual MongoCursor SetSortOrder(params string[] keys)
Parameters
keys
string[]The names of the fields to sort by.
Returns
- MongoCursor
The cursor (so you can chain method calls to it).