npgsql / EntityFramework6.Npgsql

Entity Framework 6 provider for PostgreSQL
PostgreSQL License
66 stars 53 forks source link

Geometry and Geography Types Not Being Mapped To DbGeometry and DbGeography #168

Open john-larson opened 3 years ago

john-larson commented 3 years ago

I am getting the following error when trying to use the geometry or geography types:

Errors Found During Generation:
warning 6005: The data type 'geometry' is currently not supported for the target Entity Framework version;

I am using the latest versions of EF6, Postgre and PostGIS.

roji commented 3 years ago

The PostgreSQL EF6 provider is mostly in archive mode, with no efforts going into it (I'd recommend considering switching to EF Core). I honestly am not sure if DbGeography/DbGeometry support was ever implemented in any way.

gcapnias commented 3 years ago

I really do not understand this strategy; there are code projects already implemented that need spatial support in EF6. Although, the effort is to support EF Core, for projects that will happen in the future.

There is no way the for all existing production code to be transferred to .NET Core. There are projects that are already commissioned, and will remain in production for the next 5 to 10 years. Why refuse support for the existing projects, projects that already promote PostgreSQL in .NET, for new projects that probably will happen.

roji commented 3 years ago

I really do not understand this strategy [...] Why refuse support for the existing projects [...]

There is no "strategy" here, and nobody is refusing support for anything. This is a volunteer-based, open source project, and none of the maintainers (basically just me at this point) have time for anything beyond critical bug fixes for this project. Just like Entity Framework 6 is no longer being actively developed by Microsoft, the Npgsql EF6 provider also is no longer being actively developed.

Are you interested in putting in the time and preparing a PR adding support for this? If so, please let me know your plans and I may be able to find the time to review and merge it - though I can't be sure of when that would happen.

new projects that probably will happen.

Anyone starting a new project with EF6 at this point is probably making a mistake.

Emill commented 3 years ago

Does this even work? I thought EF6 only has a limited set of fixed data types that can be supported?

roji commented 3 years ago

I have no idea...