Inheritance security rules violated by type: 'MySql.Data.Entity.MySqlEFConfiguration'

后端 未结 7 2059
滥情空心
滥情空心 2020-12-14 02:41

I\'ve created an asp.net web application which should connect to a mysql database.

I´m using entity framework 6 with an ado.net entity data model. I´ve also followed

7条回答
  •  既然无缘
    2020-12-14 02:49

    The same for me with VS2017. I used MySql.Data.Entity v6.9.10.
    Prior to that I also installed mysql connector for .Net version 6.9.10.

    • After that I installed the NuGet package for MySql.Data.Entity.
    • Last step was to modify the web.config accordingly:
      • connection string,
      • entity framework and
      • system.data (be aware that you have to update in the last two the version as well if you take them from mysql website)
    • Ahh not to forget I added also

      DbConfiguration.SetConfiguration(new MySqlEFConfiguration()) 
      

      in my app start up.

    and it finally worked :D

提交回复
热议问题