错误1:

定的架构无效。错误: DataModel.ssdl(2,2) :

错误 0152: 未找到具有固定名称“System.Data.SqlClient”的 ADO.NET 提供程序的实体框架提供程序。请确保在应用程序配置文件的“entityFramework”节中注册了该提供程序。有关详细信息,请参阅 http://go.microsoft.com/fwlink/?

解决办法,将以下代码添加至web.config配置文件中即可:

  <entityFramework>

    <providers>

      <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />

    </providers>

  </entityFramework>

 引用:

同个项目写webservice引用EF出现的问题

 

 

 

 

 

错误2:无法读取配置节“entityFramework”,因为它缺少节声明

<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" />
</configSections>

同个项目写webservice引用EF出现的问题

 

相关文章:

  • 2021-11-22
  • 2022-12-23
  • 2021-05-19
  • 2022-02-15
  • 2021-05-20
  • 2021-07-06
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-12-01
  • 2021-12-29
  • 2022-03-10
  • 2022-12-23
  • 2021-05-31
相关资源
相似解决方案