首页 > 其他 > 详细

EF--Code First配置问题

时间:2015-04-24 01:01:21      阅读:503      评论:0      收藏:0      [点我收藏+]

工具生成的连接:<add name="Base_dbContext" connectionString="Data Source=dbaddress;Initial Catalog=dbname;Persist Security Info=True;User ID=sa;Password=123456;MultipleActiveResultSets=True"

providerName="System.Data.SqlClient" />

 

运行时提示错误:An error occurred while getting provider information from the database. This can be caused by Entity Framework using an incorrect connection string. Check the inner exceptions for details and ensure that the connection string is correct.

 

正确连接: <add name="Base_dbContext" connectionString="Data Source=dbaddress;Initial Catalog=dbname;Integrated Security=SSPI;User ID=sa;Password=123456;MultipleActiveResultSets=True" providerName="System.Data.SqlClient" />

EF--Code First配置问题

原文:http://www.cnblogs.com/hsyzero/p/4452257.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!