EntityFramework6.Npgsql
EntityFramework6.Npgsql copied to clipboard
Map geometry/geography for EF6
From @roji on May 25, 2015 15:7
I happened to notice that Entity Framework's PrimitiveTypeKind
enum has geography/geometry members, this probably means we can use EF to cleanly map PostgreSQL geometry types and/or PostGIS types (which aren't yet implemented: #529).
Copied from original issue: npgsql/npgsql#623
From @RefactorMan on July 8, 2015 5:39
Hi,
What's your plan about this feature? Me and my company uses npgsql for very long time with EF6. We have PostGis data types in our schema, and we do patches to make it work with EF...
Oh, and thanks for your great work!
It's definitely something we'd like to see, but unfortunately we're much too busy with other stuff to do it at the moment (Npgsql 3.0.0, Entity Framework 7).
Also, before this can implemented, PostGIS support needs to be implemented at the Npgsql ADO.NET level (i.e. outside the EF6 provider), this is issue #529.
Note that EF7 seems to allow for totally custom types, which make it ideal for supporting PostGIS and other PostgreSQL-specific types.
Basically if anyone is willing to contribute that would be great :)
Is there any progress on this? We're moving our code from NHibernate+PostGIS to EF6+PostGIS and we can define the DbGeometry type in code, doing code first doesn't work because of the 'Not supported edm type: Edm.Geometry' error.
We at least would like to know if using Npgsql is still the best option or if we should move to another provider.
Is there any progress on this? Im still waiting.
I'm sorry that there hasn't been any progress on this, but Npgsql is an open-source project and my time is limited. As this issue is flagged "up for grabs", it's basically waiting for someone to come along and implement it.