No Entity Framework provider found for the ADO.NET provider with invariant name 'MySql.Data.MySqlClient' - WCF

前端 未结 1 1584
清酒与你
清酒与你 2020-12-20 06:34

I am following the tutoriel here (in french) but I have this commun error coming when I am testing my WCF application with WcfTestClient.

No Entity Fr

相关标签:
1条回答
  • 2020-12-20 07:34

    I suppose if you use entity framework you must have an ApplicationContext class inheriting from DbContext.If this is the case you need to add an annotation on the ApplicationContext class like this:

    using System.Data.Entity;
    
    [DbConfigurationType(typeof(MySql.Data.Entity.MySqlEFConfiguration))]
    public abstract class ApplicationContext : DbContext
    {
         //Instructions.........
    }
    

    You can also edit your Web.Config file at the entityframework tag like this :

    <entityFramework codeConfigurationType="MySql.Data.Entity.MySqlEFConfiguration, MySql.Data.Entity.EF6">
    

    You can always refer to this link :

    http://dev.mysql.com/doc/connector-net/en/connector-net-entityframework60.html

    0 讨论(0)
提交回复
热议问题