Open JeremyLikness opened 2 years ago
One caveat to using Microsoft.Spatial types in your EF Core model is that your queries are limited to the spatial operations available on those types. Today, that's only three operations: Distance, Intersects, and Length. Also, there is no client-side implementation of these operations--they just throw NotImplementedException
. (Easy to see why we went with NTS, isn't it?)
Related to Issue #22951
Currently, EF Core recognizes spatial types based on the NetTopologySuite (NTS) while OData recognizes the types in Microsoft.Spatial. This means there is no "easy path" to using spatial with both EF Core and OData, but a complicated set of customizations like the ones described in Customizing $filter for spatial data in ASP.NET Core OData 8. .NET developers deserve a streamlined experience here.
There are two solutions @bricelam suggested: