VS. + EF6 + MySQL5.7 establish entity model Flash-back problem

Source: Internet
Author: User

Pre-record

Recently useful to MySQL's spatial data this piece.

For this piece of data type, how to use it in. NET is not very clear.

So I thought about how it was used in EF. As a result, creating a new project, establishing a solid model, is always unsuccessful.

Finally, after many attempts, access to solve.

Here is the concrete pass.

The experience of failure

The specific environment is: VS2017,. NET Framework 4.6, MySql.Data.Entity 6.9.12

In this environment is always unsuccessful, specifically in this step to flash back, also do not error:

After clicking "Next", do not go to the next step, the window is directly turned off.

Consider the possibility of a. NET Framework issue, replacing other versions;

Consider the possibility of a MySql.Data.Entity problem, the replacement of several versions of the test is still not working;

Check there is said, mysql-connector-net version of the problem, I looked under, I installed is: mysql-connector-net-6.9.9, corresponding to the MySql.Data.Entity also changed to 6.9.9, the same error.

So what's the problem?

Is that mysql-connector-net version too low? It is recommended to switch to 6.9.10, download the Discovery official Web site does not provide this version, other places can be downloaded.

Here's a question: the mysql-connector-net version number that the official website can download and the MySql.Data.Entity version number above nuget is one by one (although NuGet can install any version with the console)

Based on this, the following experiment was started.

A successful trial

The above mentioned problems, see the official website mysql-connector-net have 6.9.12/6.10.7 can download, generally the newest not necessarily good, then download 6.9.12, uninstall the original 6.9.9, install the new 6.9.12.

This environment: VS2017,. NET Framework 4.6, MySql.Data.Entity 6.9.12 (do you see the same as above?) )

Here, the modeling is successful! Successful come here:

By this, the experiment was completed and it was successful.

personally think: if you encounter EF + MySQL modeling problem, the Mysql-connector-net version and MySql.Data.Entity version of the same (where mysql-connector-net is available to download), basic can solve the problem .

Finally, at the very beginning, you want to see how the spatial data format is handled in EF, and the results are good, but we find that EF has no mapping spatial data (/(ㄒoㄒ)/~~).

Well, it's a pit too.

VS. + EF6 + MySQL5.7 establish entity model Flash-back problem

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.