Does the dev art connector support EF5/ASP.NET MVC 4 100%

Discussion of open issues, suggestions and bugs regarding Entity Framework support in ADO.NET Data providers
Post Reply
kasperhj
Posts: 7
Joined: Thu 22 Nov 2012 14:05

Does the dev art connector support EF5/ASP.NET MVC 4 100%

Post by kasperhj » Thu 22 Nov 2012 14:12

I am considering upgrading my mysql dot connect, but before I make my final decision, I would like to know if it will work 100% with EF5, specifically the ASP.NET MVC 4, out of the box projects. I am having some problems with this using the connector from mysql.com.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: Does the dev art connector support EF5/ASP.NET MVC 4 100%

Post by Shalex » Fri 23 Nov 2012 15:33

dotConnect for MySQL Professional fully supports EF5. We do not know any ASP.NET MVC4-specific problems. We recommend you to evaluate the trial version (free use during 30 days): http://www.devart.com/dotconnect/mysql/download.html.

kasperhj
Posts: 7
Joined: Thu 22 Nov 2012 14:05

Re: Does the dev art connector support EF5/ASP.NET MVC 4 100%

Post by kasperhj » Sat 24 Nov 2012 19:46

I have installed the trial, and now I am getting an error "Unable to find the requested .Net Framework Data Provider. It may not be installed."

I have references to: Devart.Data.MySql and Devart.Data.MySql.Entity
In my Web.Config I have the following

Code: Select all

  <system.data>
    <DbProviderFactories>
      <remove invariant="Devart.Data.MySql" />
      <add name="dotConnect for MySQL" invariant="Devart.Data.MySql" description="Devart dotConnect for MySQL" type="Devart.Data.MySql.MySqlProviderFactory, Devart.Data.MySql, Version=7.2.122.0, Culture=neutral, PublicKeyToken=09af7300eec23701" />
    </DbProviderFactories>
  </system.data>
and

Code: Select all

  <connectionStrings>
    <add name="DefaultConnection" connectionString="Datasource=localhost;Database=test_db;uid=usr;pwd=pass;"
  providerName="Devart.Data.MySql.MySqlConnection" />

  </connectionStrings>
What could be wrong?

Also, is it necessary with the following?

Code: Select all

  <entityFramework>
    <defaultConnectionFactory type="Devart.Data.MySql.MySqlProviderFactory, Devart.Data.MySql" />
  </entityFramework>

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: Does the dev art connector support EF5/ASP.NET MVC 4 100%

Post by Shalex » Mon 26 Nov 2012 13:03

kasperhj wrote:

Code: Select all

      <connectionStrings>
        <add name="DefaultConnection" connectionString="Datasource=localhost;Database=test_db;uid=usr;pwd=pass;"
      providerName="Devart.Data.MySql.MySqlConnection" />

      </connectionStrings>
What could be wrong?
You should use "Devart.Data.MySql" insead of "Devart.Data.MySql.MySqlConnection" in the providerName section.
kasperhj wrote:Also, is it necessary with the following?

Code: Select all

      <entityFramework>
        <defaultConnectionFactory type="Devart.Data.MySql.MySqlProviderFactory, Devart.Data.MySql" />
      </entityFramework>
We recommend using DefaultConnectionFactory only with SQLite: http://blogs.devart.com/dotconnect/enti ... qlite.html, the DefaultConnectionFactory section.

kasperhj
Posts: 7
Joined: Thu 22 Nov 2012 14:05

Re: Does the dev art connector support EF5/ASP.NET MVC 4 100%

Post by kasperhj » Tue 27 Nov 2012 18:14

It's working now, thanks.

Post Reply