mvc 实体名字 Db 为 ManagerDb 后加载不到元数据
改配置文件 app.Cogfig中res://*/Entities.rDb.csdl|res://*/Entities.Db.ssdl|res://*/Entities.Db.msl改 为
res://*/Entities.ManagerDb.csdl|res://*/Entities.ManagerDb.ssdl|res://*/Entities.ManagerDb.msl
<add name="dacaimsdbEntities" connectionString="metadata=res://*/Entities.ManagerDb.csdl|res://*/Entities.ManagerDb.ssdl|res://*/Entities.ManagerDb.msl;provider=System.Data.SqlClient;provider connection string="data source=192.168.1.187,2012;initial catalog=dacaimsdb;persist security info=True;user id=sa;password=lykj705706;MultipleActiveResultSets=True;App=EntityFramework"" providerName="System.Data.EntityClient" />
删除模型后重新加载模型
删除App.Config 中 <add name="dacaimsdbEntities" connectionString="metadata=res://*/Entities.ManagerDb.csdl|res://*/Entities.ManagerDb.ssdl|res://*/Entities.ManagerDb.msl;provider=System.Data.SqlClient;provider connection string="data source=192.168.1.187,2012;initial catalog=dacaimsdb;persist security info=True;user id=sa;password=lykj705706;MultipleActiveResultSets=True;App=EntityFramework"" providerName="System.Data.EntityClient" />