System.InvalidOperationException:“No connection string named 'AiXiuDbContext' could be found in the application config file.”异常处理
在生成的EF中的app.config文件中复制
<connectionStrings> <add name="AiXiuDbContext" connectionString="data source=.;initial catalog=DBAiXiu;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework" providerName="System.Data.SqlClient" /> </connectionStrings>
复制放入窗体生成的Web.config文件中