本文介绍了如何与PostgreSQL的6.0.2的EntityFramework整合?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 我收到以下错误 Can any one help mehere is my App.Config File<?xml version="1.0" encoding="utf-8"?><configuration> <configSections> <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 --> <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" /> </configSections> <connectionStrings> <add name="CacsLocal" connectionString="Server=localhost;Database=Kappa;User Id=postgres; Password=xyz;" providerName="Npgsql" /> <add name=" CacsCentral" connectionString="Server=localhost;Database=KPT1;User Id=postgres; Password=insane1234;" providerName="Npgsql" /> </connectionStrings> <entityFramework> <defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" /> <providers> <provider invariantName="Npgsql" type="Npgsql.NpgsqlServices, Npgsql" /> <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer"></provider> </providers> </entityFramework> <system.data> <DbProviderFactories> <add name="Npgsql Data Provider" invariant="Npgsql" description="Data Provider for PostgreSQL" type="Npgsql.NpgsqlFactory, Npgsql" /> </DbProviderFactories> </system.data> <startup> <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" /> </startup></configuration>I have Npgsql2 version 2.0.14.2Entity Framework 6.0.2All the packages are installed through Package Manager by following commandInstall-Package Npgsql -PreInstall-Package EntityFramework -PreThanks 解决方案 Check out this question: Entity Framework 6 with NpgsqlIt has the pointers to get it working. I hope it helps. 这篇关于如何与PostgreSQL的6.0.2的EntityFramework整合?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 10-22 00:06