PostgreSQL data provider missing from wizard in Visual Studio 2015

后端 未结 2 1412
旧巷少年郎
旧巷少年郎 2021-01-24 05:13

I\'ve spent a day trying to migrate an Entity Framework 6 SQL Server CE to PostgreSQL.

I\'ve copied the database over fine, but I can\'t seem to get the data provider to

相关标签:
2条回答
  • 2021-01-24 06:07

    Installing the npgsql extension as described in tsChan's answer wasn't enough for me, I also had to modify my app.config (I suspect because it was created before I installed the extension) to include the npgsql data provider in the EntityFramework section as follows:

    <entityFramework>
        <defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
        <providers>
          <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />      
          <provider invariantName="Npgsql" type="Npgsql.NpgsqlServices, EntityFramework6.Npgsql" />
        </providers>
      </entityFramework>
    

    After I did that, the provider appeared in the wizard options.

    0 讨论(0)
  • 2021-01-24 06:11

    I got it working with installing the Visual Studio Extension Npgsql PostgreSQL Integration. Follow the instruction on this page: http://www.npgsql.org/doc/ddex.html

    This thread led me to the right path: Add custom data source to visual studio 2015

    0 讨论(0)
提交回复
热议问题