Closed john-larson closed 3 years ago
@john-larson you can't extend and map arbitrary types in this way - the EF NetTopologySuite provider knows about Point, but not about your specific type.
If all you want to do is to provide Latitude/Longtitude aliases, you can add extension methods. Another possibility would be to use EF Core value converters to convert from your custom type to the standard Point. With both these techniques, though, you will not be able to use the members in a LINQ query and have that translated to SQL.
I would like to express lat and long as "latitude" and "longitude" in code instead of X and Y which is what NTS supports. How would it be possible to use the following type instead of NetTopologySuite Point:
When I try to use it, I get the following error for insert: