In a previous post I explained on how to enable spatial type support for your Entity Framework (core) model. If you added the HasPostgresExtension("postgis") check, you get the following error message when you try to execute the Entity Framework migration and the extension is not installed:
could not open extension control file "/usr/share/postgresql/9.5/extension/postgis.control": No such file or directory
To install the extension you can follow the instructions on the postgis website: https://postgis.net/install/. The installation differs based on the host platform you are using for your PostgreSQL instance.
After installation has completed you can activate the extension for you database using the following statement:
-- Enable PostGIS (includes raster) CREATE EXTENSION postgis;