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

项目分层,EntityFramework层引入了EntityFramework包,Service层引用了 EntityFramework层,写了一些service类, 在Web层调用Service层的service类进行数据访问操作,结果报错:
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=26088

经多方查找,发现除了EntityFramework层引入EntityFramework包之外,在Web层也要引入EntityFramework包。问题解决。

解决方案地址:
https://blog.csdn.net/laokaizzz/article/details/22506311?locationNum=8

原文地址:https://www.cnblogs.com/Mxy-cnblog/p/9529739.html