jmcd jmcd - 2 years ago 128
C# Question

How to specify an Order or Sort using the C# driver for MongoDB?

I'm trying to figure out how to sort a collection of documents server side by telling the C# driver what the sort order is, but it appears not to support that construct yet.

Is it possible to do this any other way?

Answer Source

You can also do it using the SetSortOrder method on the MongoCursor class:

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download