While the C# Driver supports Geospacial types (GeoJSON) if you wish to perform any of the operations you must use the Filters API for within, near or intersects.
It would be great if we had simple methods that could be used in LINQ operations without using the filters API, e.g.
postcodes.Where(r => Mql.Near(r.GeoLocation, origin, 10, true))
This would be the first step in getting this working for our EF Core Provider as requested on the community forums at https://www.mongodb.com/community/forums/t/ef-provider-support-for-geojson-objects/311420
There would likely be three methods stubs for $near, $geoWithin and $geoIntersects on the static Mql class we currently use for field etc. with signatures to match the query parameters.
- depends on
-
CSHARP-5505 Add $geoNear stage aggregation builders
-
- In Code Review
-