I am trying to migrate a webform from ASP.NET MVC to ASP.NET Core MVC. Currently I am trying to find a way to replace:
using System.Data.Entity.Spatial;
Spatial data isn't supported yet by Entity Framework Core.
Spatial is not planned for 2.0 and we haven’t finished planning for the version after. It might be a good idea to post more details about what you would like to have in spatial support at https://github.com/aspnet/EntityFramework/issues/1100, e.g. do you use specific spatial functions or do you need rich spatial types with all kinds of spatial functionality, would you use this only with a specific database or do you need to write the same code against multiple databases? Etc.
(Source: MSDN .NET Blog)
I have made a temporary workaround to include Geography column and use it in EF Core 1.0.0 and above. It's not perfect, but it will do for now. (Similar to Hatef’s answer apparently, wow great minds think alike I guess.)
See the accepted answer on: Entity Framework Core: Type Udt is not supported on this platform. (Spatial Data - Geography)