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" />
?
運行時提示錯誤: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" />
轉載于:https://www.cnblogs.com/hsyzero/p/4452257.html
超強干貨來襲 云風專訪:近40年碼齡,通宵達旦的技術人生總結
以上是生活随笔為你收集整理的EF--Code First配置问题的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 输出枚举类型的值(seqmentatio
- 下一篇: 如何验证本地磁盘或网络磁盘是否可以进行读