1

In MongoDb I can make queries to get entries near to a point. As I need paging I use the overload which accepts a sort and a paging parameter.

So my Query looks like this:

Filter.NearSphere(x => x.Geolocation, location.Geography.Geolocation.Longitude, location.Geography.Geolocation.Latitude, location.Radius / 6371000), Sort.Ascending(myField), paging)

But now I want them sorted by distance. What you I pass to the Sort parameter?

Boas Enkler
  • 12,264
  • 16
  • 69
  • 143

0 Answers0