我们在用MVC+EF做程序的时候,这里使用的数据库是SqlServer,有时候会报下面的错误:
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.
解决方法:
看一下是不是,没有引用这两个dll,
EntityFramework.dll 和 EntityFramework.SqlServer.dll
有时候我们只引用了EntityFramework.dll而没有引用EntityFramework.SqlServer.dll,所以报错,