Using DbGeography Tyes with Entity Framework 7 and vNext c# entity-framework entity-framework-core spatial


I am building an application that will use Spatial Data with vNext and EF7. In the past with the current version of and EF6 I have used System.Data.Entity.Spatial in order to use the DbGeography however now this namespace is not available.

Currently I have the following nuget packages in my project.json file:

  • "EntityFramework.Commands": "7.0.0-rc1-final"
  • "EntityFramework.Core": "7.0.0-rc1-final"
  • "EntityFramework.MicrosoftSqlServer": "7.0.0-rc1-final"

Is there a package that I am missing, or is support for Spatial Data Types with SQL Server something that has not been implemented yet? I notice that there is a backlog feature marked ‘Modelling - Complex/value types’ on the EF7 github Roadmap, but I don’t see any specifics.

If there is a package I am missing, what is the package so I can include it.

Many thanks in advance

12/22/2015 12:50:18 AM

Popular Answer

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, 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."


Altought 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)

See the accepted answer on:

Entity Framework Core: Type Udt is not supported on this platform. (Spatial Data - Geography)

7/6/2017 12:56:59 PM

Related Questions


Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow