entity-framework - 未找到具有固定名称 'System.Data.SqlClient' 的 ADO.NET 提供程序的 Entity Framework 提供程序

标签 entity-framework

通过 nuget 下载 EF6 并尝试运行我的项目后,它返回以下错误:

No Entity Framework provider found for the ADO.NET provider with invariant name 'System.Data.SqlClient'. Make sure the provider is registered in the 'entityFramework' section of the application config file. See http://go.microsoft.com/fwlink/?LinkId=260882 for more information.

enter image description here

最佳答案

我刚刚遇到了同样的问题,尽管从 NuGet 包管理器安装了 EntityFramework,但它看起来并没有正确安装在项目中。

我设法通过在 Package Manager Console 上运行以下命令来修复它:

PM> Install-Package EntityFramework

关于entity-framework - 未找到具有固定名称 'System.Data.SqlClient' 的 ADO.NET 提供程序的 Entity Framework 提供程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18455747/

相关文章:

c# - EntityFramework Fluent API 外键排序

c# - EF 迁移 - 在迁移期间使用 C# 业务逻辑修改现有数据

c# - 如何在基于MVC4/EF 6+的应用中实现事务

c# - 将列表保存到数据库 Entity Framework

c# - 即使对于最简单的示例,EF Core 3.1/EF Core 5.0中的GroupBy也无法正常工作

c# - Entity Framework : One<->Many<->One Mapping?

c# - IEnumerable<T> 和 Take(x) 问题?

c# - 使用 1 时出现问题 :M -> M:1 in Entity Framework

c# - asp.net mvc 中的数据库上下文类的用途是什么

c# - 无法先从模型代码中删除 FK