Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/entity-framework/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# ConfigurationErrorsException:未能找到或加载已注册的.Net Framework数据提供程序_C#_Entity Framework_Entity Framework 5_Mysql Connector - Fatal编程技术网

C# ConfigurationErrorsException:未能找到或加载已注册的.Net Framework数据提供程序

C# ConfigurationErrorsException:未能找到或加载已注册的.Net Framework数据提供程序,c#,entity-framework,entity-framework-5,mysql-connector,C#,Entity Framework,Entity Framework 5,Mysql Connector,我正在VS2010上使用C#,我正在尝试使用实体框架5。我的数据库是MySQL,我使用提供的连接器 当我使用实体模型表进行读取时,会收到此异常消息。 也许还有其他类似的问题,但我找不到解决办法 我的代码与此类似: using (Entities model = new Entities()) { handler h = model.handlers.Find(0); //here i get the exception

我正在VS2010上使用C#,我正在尝试使用实体框架5。我的数据库是MySQL,我使用提供的连接器

当我使用实体模型表进行读取时,会收到此异常消息。 也许还有其他类似的问题,但我找不到解决办法

我的代码与此类似:

    using (Entities model = new Entities())
        {

            handler h = model.handlers.Find(0);  //here i get the exception
            Console.Out.WriteLine(h.device_name);


        }
在我的packages.config文件中,我读取了以下xml代码:

    <packages>
        <package id="EntityFramework" version="5.0.0" targetFramework="net40-Client" />
    </packages>


我应该在这个文件中进行某种配置设置吗?

最后我发现了问题所在

我必须使用正确的MySQL连接器

问题结束了