public void SetUp()
        {
            var db = Configuration.TestDatabase;
            _collection = db.GetCollection<GeoClass>("geo");

            _collection.Drop();
            _collection.CreateIndex(IndexKeys<GeoClass>.GeoSpatialSpherical(x => x.Location));
            _collection.CreateIndex(IndexKeys<GeoClass>.GeoSpatialSpherical(x => x.Surrounding));

            var doc = new GeoClass
            {
                Id = 1,
                Location = GeoJson.Point(GeoJson.Geographic(40.5, 18.5)),
                Surrounding = GeoJson.Polygon(
                    GeoJson.Geographic(40, 18),
                    GeoJson.Geographic(40, 19),
                    GeoJson.Geographic(41, 19),
                    GeoJson.Geographic(40, 18))
            };

            _collection.Save(doc);
        }
        public QueryBuilderGeoJsonIntegrationTests()
        {
            var db = LegacyTestConfiguration.Database;

            _collection = db.GetCollection <GeoClass>("geo");

            _collection.Drop();
            _collection.CreateIndex(IndexKeys <GeoClass> .GeoSpatialSpherical(x => x.Location));
            _collection.CreateIndex(IndexKeys <GeoClass> .GeoSpatialSpherical(x => x.Surrounding));

            var doc = new GeoClass
            {
                Id          = 1,
                Location    = GeoJson.Point(GeoJson.Geographic(40.5, 18.5)),
                Surrounding = GeoJson.Polygon(
                    GeoJson.Geographic(40, 18),
                    GeoJson.Geographic(40, 19),
                    GeoJson.Geographic(41, 19),
                    GeoJson.Geographic(40, 18))
            };

            _collection.Save(doc);
        }
        public void SetUp()
        {
            var db = Configuration.TestDatabase;

            _collection = db.GetCollection <GeoClass>("geo");

            _collection.Drop();
            _collection.EnsureIndex(IndexKeys <GeoClass> .GeoSpatialSpherical(x => x.Location));
            _collection.EnsureIndex(IndexKeys <GeoClass> .GeoSpatialSpherical(x => x.Surrounding));

            var doc = new GeoClass
            {
                Id          = 1,
                Location    = GeoJson.Point(GeoJson.Geographic(40.5, 18.5)),
                Surrounding = GeoJson.Polygon(
                    GeoJson.Geographic(40, 18),
                    GeoJson.Geographic(40, 19),
                    GeoJson.Geographic(41, 19),
                    GeoJson.Geographic(40, 18))
            };

            _collection.Save(doc);
        }
 private static extern int GetUserGeoID(GeoClass geoClass);