I have a postgre database with postgis geometries that i would like to access using Entity framework and npgsql. I tried to go for the "EF designer from database" , but when doing so i only get the non-geometric columns.

From a previous post, .NET Entity Framework with PostGIS? (from 2011) i realized that i might need a library to handle the geometry, which i would prefer to be NetTopologySuite. I tried to add NetTopologySuite.IO.postgis, but that dit not help ;)

Does EF6 support geometries natively or should i use a library like NetTopologySuite, and how do i make "EF designer from database" add the geometry columns automatically?

I have tested it using:

EntityFramework v. 6.0.0

Npgsql v. 3.2.5

EntityFramework6.npgsql v. 3.1.1

using the server explorer in visual studio do se the geometry columns of the postgre database table, with the data type geometry.

  • Can you find any solution? – Ömür Bilgili Jan 16 '18 at 11:12
  • same problem here... there is a workaround for accomplish this? seems that there is not compatibility yet. – rolivares Feb 18 at 14:29
  • no i did not find any solution – William Feb 20 at 14:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.