错误-尝试通过方法“X.set_DbConnection(System.Data.Common.DbConnection)"访问方法“Y.get_Settings()"失败 [英] Error-Attempt by method 'X.set_DbConnection(System.Data.Common.DbConnection)' to access method 'Y.get_Settings()' failed

查看:29
本文介绍了错误-尝试通过方法“X.set_DbConnection(System.Data.Common.DbConnection)"访问方法“Y.get_Settings()"失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个控制台应用程序并使用 EntityFramework 6.2(用于连接 MS SQL)、MySql.Data 8.0.11 和 MySql.Data.Entity 6.10.7(用于连接 MySQL).

I created a console app and use EntityFramework 6.2 (for connection with MS SQL), MySql.Data 8.0.11 and MySql.Data.Entity 6.10.7 (for connection with MySQL).

在此应用程序中,我想创建一个类似于 SQL 作业的作业,但我不想使用 quertz.net.我有错误:

In this application I want to create a job like an SQL job but I don't want to use quertz.net. I have error:

尝试通过方法'MySql.Data.Entity.EFMySqlCommand.set_DbConnection(System.Data.Common.DbConnection)'访问方法'MySql.Data.MySqlClient.MySqlConnection.get_Settings()'失败."

"Attempt by method 'MySql.Data.Entity.EFMySqlCommand.set_DbConnection(System.Data.Common.DbConnection)' to access method 'MySql.Data.MySqlClient.MySqlConnection.get_Settings()' failed."

推荐答案

MySql.Data.Entity 6.10.7 is not compatible with MySql.Data 8.0.11.

MySql.Data.Entity 6.10.7 isn't compatible with MySql.Data 8.0.11.

Oracle 将包重命名MySql.Data.EntityFramework 适用于 v8.x.您需要卸载MySql.Data.Entity 并安装MySql.Data.EntityFramework.

Oracle renamed the package to MySql.Data.EntityFramework for v8.x. You need to uninstall MySql.Data.Entity and install MySql.Data.EntityFramework.

这篇关于错误-尝试通过方法“X.set_DbConnection(System.Data.Common.DbConnection)"访问方法“Y.get_Settings()"失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆