Error-Attempt by method 'X.set_DbConnection(System.Data.Common.DbConnection)' to access method 'Y.get_Settings()' failed

前端 未结 2 1672
無奈伤痛
無奈伤痛 2020-12-01 17:07

I created a console app and use EntityFramework 6.2 (for connection with MS SQL), MySql.Data 8.0.11 and MySql.Data.Entity 6.10.7 (for connection with MySQL).

In this

相关标签:
2条回答
  • 2020-12-01 17:32

    MySql.Data.Entity 6.10.7 isn't compatible with MySql.Data 8.0.11.

    Oracle renamed the package to MySql.Data.EntityFramework for v8.x. You need to uninstall MySql.Data.Entity and install MySql.Data.EntityFramework.

    0 讨论(0)
  • 2020-12-01 17:32

    They broth thanks, you saved my life. I have lost more than 5 hour trying to figure out what was happening. guys don't forget to put on your database Context.

    [DbConfigurationType(typeof(MySql.Data.EntityFramework.MySqlEFConfiguration))]  
    
    0 讨论(0)
提交回复
热议问题