MongoDB geospatial index in C#
问题 I have been trying to get started but run into the same rock time after time trying to create and query MongoDB with C# official driver. The problem is how to create data with geo information. I am just not finding the answer. Code: MongoUrl url = new MongoUrl("mongodb://xxx.xx.x.xx/mydb"); MongoServer server = MongoServer.Create(url); MongoDatabase database = server.GetDatabase("mydb"); <-- this works fine BsonDocument[] batch = { new BsonDocument { { "name", "Bran" }, { "loc", "10, 10" } },