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

前端 未结 11 726
青春惊慌失措
青春惊慌失措 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:02

    I've updated from EntityFramework 5.0 to 6.1 and MySQL connector 6.8.3 and only had to add the attribute to get things going again. Before adding the attribute everything would compile fine but crash at runtime.

    [DbConfigurationType(typeof(MySql.Data.Entity.MySqlEFConfiguration))]
    public class DemoContext : DbContext{}
    

提交回复
热议问题