[Solved] No connection string named ‘TestEntities’ could be found in the application config file

When executing EF operation,
no connection string named ‘testentities’ could be found in the application config file error

solution:
it is necessary to add configuration in app.config of the application

1  <connectionStrings>
2  <add name="TestEntities" 
3      connectionString="metadata=res://*/TestData.csdl|res://*/TestData.ssdl|res://*/TestData.msl;
4        provider=MySql.Data.MySqlClient;provider connection string=&quot;
5        server=localhost;user id=root;
6        password=admin;persistsecurityinfo=True;database=test&quot;"
7      providerName="System.Data.EntityClient" />
8  </connectionStrings>

Similar Posts: