Luciferous
Luciferous

Reputation: 199

EF6 postgresql database first, can't generate model

I'm following a tutorial to generate model for existing postgresql database.
I created a console application and added these NuGet packages:
EntityFramework (6.2.0), Npgsql(2.2.7), Npgsql.EntityFramework(2.2.7).

The problem is that I can't find PostgreSQL Database in the Data Source list while creating ADO.NET Entity Data model.

Does anyone know solution of the problem?

Upvotes: 1

Views: 2552

Answers (1)

KevinLamb
KevinLamb

Reputation: 634

You might need the Visual Studio extension for PostgreSQL. Then the option for connecting to the database should show up.

Right now you installed all the NuGet packages for your code to work but Visual Studio still needs the extension to be able to create entities from existing PostgreSQL databases.

Documentation: https://www.npgsql.org/doc/ddex.html

Extension: https://marketplace.visualstudio.com/items?itemName=RojanskyS.NpgsqlPostgreSQLIntegration

Upvotes: 2

Related Questions