Idan Shechter Idan Shechter - 4 months ago 22
SQL Question

Can't Create Entity Data Model - using MySql and EF6

I'm trying to add an edmx Entity model to my C#/Web Project in Visual Studio 2013. My problem is that the file is not created.

I do the following steps:


  1. Give the item a name

  2. Choose 'EF Designer from database'

  3. Choose the connection from the drop down (localhost) that already tested successfully connecting to MySQL databse

  4. The "Save connection settings in webc.config as" option is checked

  5. I click 'Next' AND the window disappeared and I get back to the code window



No edmx file is created. (although it works with SQL Server, but not for MySQL)

I have
Entity Framework 6.1.2
installed,
MySql.Data
,
MySql.Data.Entities
,
MySql.Data.Entity
,
MySql.Web
-- all installed.

I also rebuilt the project before trying to add an entity model file.

I've installed the latest MySQL package with the latest
.NET connector
.

Running: Visual Studio 2013 on Windows 7.

Any ideas how to solve this?

Answer

I solved this issue by following some steps below:

  1. Uninstall MySql.Data.Entities from Nuget by using command below in Package Manager Console: Uninstall-Package MySql.Data.Entities

  2. Add project reference to the latest MySql.Data.Entity.EF6.dll from your MySql connector installation path at: C:\Program Files (x86)\MySQL\MySQL Connector Net 6.9.8\Assemblies\v4.5