No Entity Framework provider found for 'MySql.Data.MySqlClient' ADO.NET provider

前端 未结 11 725
青春惊慌失措
青春惊慌失措 2020-11-29 04:45

I\'m trying to use Entity Framework with MySQL and I get the above error. I have the latest MySQL connector installed.

The full error reads:

No Entit         


        
11条回答
  •  借酒劲吻你
    2020-11-29 05:00

    In my case, it was a missing reference. When you upgrade to EntityFramework 6, you need to add a reference to the assembly

    System.Data.Entity

    I think it's because MySql.Data.Entity.EF6 inherits from a bunch of stuff in this assembly, that it did not for previous version of EF.

    When your app.config is good and all your references seem fine, it's a solution worth checking.

提交回复
热议问题