This article is a mirror article of machine translation, please click here to jump to the original article.

View: 16909|Reply: 0

[Solved] Method "MySql.Data.Entity.EFMySqlCommand.set_DbConnection(System.Data.Common...

[Copy link]
Posted on 3/25/2019 5:44:12 PM | | | |
Recently, in order to test the sum function error problem in EF, I made a small demo with EF+mysql, and the result is that the error is reported as follows:

Method "MySql.Data.Entity.EFMySqlCommand.set_DbConnection(System.Data.Common.DbConnection)" attempts to access method "MySql.Data.MySqlClient.MySqlConnection.get_Settings()" failed.



Baidu later found that the version of MySql.Data used was too high, and the latest 8.0.15 was used by default

Solution 1: Change the version of MySql.Data to version 6.10.8.
Solution 2: Uninstall MySql.Data.Entity from NuGet and install MySql.Data.EntityFramework. (Not tested)

In addition, the test results are attached:





Previous:C# determines whether there are illegal characters in the filename and removes illegal characters
Next:Python3 Tutorials/Books
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com