Steps I did:
- Install Npgsql EF extension for Visual studio
- Create a new Project
- Install Npgsql from nuget
- Install EntityFramework6.Npgsql from nuget
- Create connection to postgresql using Server Explorer
- Create ADO.NET Entity Data Model - EF Designer From DB
- Compile
- Create Controller using Entity Framework
The last step give me this error:
There was an error running the selected code generator:
'Unable to retrieve metadata for 'MyProject.Models.MyClass'
Unable to find the requested .Net Framework Data Provider. It may not be installed.
So I can connect to postgres, create the model from DB, but cant auto generate view from EF.
Further technical details
- Npgsql version: 3.2.7
- EntityFramework6.Npgsql 3.1.1
- PostgreSQL version: 9.4
- Operating system: Windows 10
- Visual Studio Community 2017 v15.4
In the webconfig I have this section
<dependentAssembly>
<assemblyIdentity name="Npgsql" publicKeyToken="5d8b90d52f46fda7" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.2.7.0" newVersion="3.2.7.0" />
</dependentAssembly>
Not sure if need add anything else so VS see it as Installed.
