No Entity Framework provider found for the ADO.NET provider with invariant name 'System.Data.SqlClient'.
Issue:
error 0152: 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
Solution:
Make sure that you installed entityFramework on presentation layer as well.
It will add following configuration in web.config of presentation layer.
<entityFramework> <defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework"> <parameters> <parameter value="mssqllocaldb" /> </parameters> </defaultConnectionFactory> <providers> <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" /> </providers> </entityFramework>
And more thing
Please make sure that you have EntityFramework.SqlServer.dll
Hope your issue will resolved.
Enjoy :)
No comments:
Post a Comment