EF6 with MySQL. The given key was not present in the dictionary

前端 未结 3 882
抹茶落季
抹茶落季 2021-01-25 00:16

I have Asp.Net MVC 5 application using Code First Entity Framework 6 linked to MySQL database.

When I created the database first time, it works fine. But when I make a c

3条回答
  •  说谎
    说谎 (楼主)
    2021-01-25 00:50

    Don't apply the newest mysql tools

    1. Close Visual studio 2017

    2. Uninstall mysql-for-visualstudio 2.0.5 Then, install mysql-for-visualstudio 1.2.8

    3. Uninstall mysql-connector-net-8.0.17 Then, install mysql-connector-net-6.9.10. Find the mysql.data.dll, MySql.Data.Entity.EF6.dll in %Program Files (x86)%\MySQL\MySQL Connector Net 6.9.10\Assemblies\v4.5 Add to reference

    4. Open nuget in references, downgrade EntityFramework 6 to EntityFramework 5

提交回复
热议问题