Bhav
Bhav

Reputation: 2195

Creating an ADO.Net Entity Data Model with MySQL database?

I've created a new ASP.Net MVC Project and added references to MySql.Data, MySql.Data.Entity, MySql.Data.Entity.EF6 and MySql.Web.v20.

I've also modified the web config and added the following:

<system.data>
<Dbproviderfactories>
<clear/>
<add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=6.9.6.0, Culture=neutral, PublicKeyToken=C5687FC88969C44D" />
</Dbproviderfactories>
</system.data>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
<providers>
<provider invariantName="MySql.Data.MySqlClient" type="MySql.Data.MySqlClient.MySqlProviderServices, 
    MySql.Data.Entity.EF6" />
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, 
    EntityFramework.SqlServer" />
</providers>
</entityFramework>

However, when I try to add an ADO.Net Entity Data Model, Visual Studio doesn't pick up MySQL as a data source as shown below: enter image description here

Any ideas why this is and how I could resolve this?

Thanks

Upvotes: 2

Views: 6075

Answers (1)

Bhav
Bhav

Reputation: 2195

I uninstalled the MySQL .Net Connector and installed the latest version.

I updated Visual Studio 2013 to Update 4.

I installed the latest MySQL for Visual Studio.

I created a new ASP.Net MVC Project and added references to MySql.Data, MySql.Data.Entity.EF6 and MySql.Web.v20.

Upvotes: 2

Related Questions