Home > Database > Mysql Tutorial > How to Create an Entity Data Model with MySQL and EF6 in Visual Studio 2013?

How to Create an Entity Data Model with MySQL and EF6 in Visual Studio 2013?

Mary-Kate Olsen
Release: 2024-11-25 07:23:10
Original
714 people have browsed it

How to Create an Entity Data Model with MySQL and EF6 in Visual Studio 2013?

Unable to Create Entity Data Model with MySQL and EF6

Problem:

While attempting to create an EF Designer from database using MySQL and EF6 in Visual Studio 2013, the edmx file fails to generate.

Investigations:

  • The connection to the MySQL database has been tested and is successful.
  • Entity Framework 6.1.2 and related MySQL packages are installed.

Solution:

The issue can be resolved by following a specific installation and configuration sequence:

  1. Uninstall "Connector/NET" and "MySQL for Visual Studio" if previously installed.
  2. Install "MySQL for Visual Studio" v2.0.5 CTP.
  3. Install "Connector/NET" v6.9.10.
  4. Create a new Visual Studio project.
  5. Install "EntityFramework" v6.2.0 through NuGet.
  6. Add references to MySql.Data.dll and MySql.Data.Entity.EF6.dll assemblies.
  7. Configure the App.config file to include the MySQL EF6 provider:
<entityFramework>
  <providers>
    <provider invariantName="MySql.Data.MySqlClient"
         type="MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.Entity.EF6" />
  </providers>
</entityFramework>
Copy after login
  1. Rebuild the project.

References:

  • [Can't Create Entity Data Model - using MySql and EF6](https://stackoverflow.com/questions/17226035/cant-create-entity-data-model-using-mysql-and-ef6)
  • [No Entity Framework provider found for 'MySql.Data.MySqlClient' ADO.NET provider](https://stackoverflow.com/questions/30678523/no-entity-framework-provider-found-for-mysqldatamySqlClient-adonet-provider)

The above is the detailed content of How to Create an Entity Data Model with MySQL and EF6 in Visual Studio 2013?. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template