EF--Code First配置问题
用EntityFramework Reverse POCO Generator工具生成的連接:<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" />
?
運(yùn)行時(shí)提示錯(cuò)誤: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" />
轉(zhuǎn)載于:https://www.cnblogs.com/hsyzero/p/4452257.html
超強(qiáng)干貨來(lái)襲 云風(fēng)專訪:近40年碼齡,通宵達(dá)旦的技術(shù)人生總結(jié)
以上是生活随笔為你收集整理的EF--Code First配置问题的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: 输出枚举类型的值(seqmentatio
- 下一篇: 如何验证本地磁盘或网络磁盘是否可以进行读