2
I have the following error using Entity Framework:
Additional information: 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.
From what I’ve researched EPH couldn’t find my ConnectionString
and uses the standard
Data Source=.\\SQLEXPRESS;Initial Catalog=ResenhaInformalContext;Integrated Security=True;MultipleActiveResultSets=True
I’m wearing a WINDOWS FORMS APPLICATION and a CLASS LIBRARY of infrastructure already put the ConnectionString
in App.Config, both in the Class Library where the Entity Framework is installed, and in the W.F where the start of the application takes place.
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<connectionStrings>
<add name="ResenhaInformalContext" connectionString="Data Source=RENAN- NB\ESPACOCULTURA;Initial Catalog=ResenhaInformalContext;Persist Security Info=True;User ID=sa;Password=renan010203;MultipleActiveResultSets=True" providerName="System.Data.SqlClient" />
</connectionStrings>
How to resolve this error ?
In the Package Manager Console execute the following command:
Install-Package EntityFramework
– gato
I have it installed in the infrastructure layer... You say I should also install in the WF application?
– user37440
Vc added the EF reference to your project?
– gato
This is usually because the EF not installed right, the above command is to reinstall it correctly.
– gato