执行EF操作时遇到
No connection string named 'TestEntities' could be found in the application config file错误
解决:
需要在应用程序的App.config中增加配置
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=" 5 server=localhost;user id=root; 6 password=admin;persistsecurityinfo=True;database=test"" 7 providerName="System.Data.EntityClient" /> 8 </connectionStrings>