简体   繁体   中英

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?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM