Page 1 of 1

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

Posted: Thu 22 Nov 2012 14:12
by kasperhj
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.

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

Posted: Fri 23 Nov 2012 15:33
by Shalex
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.

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

Posted: Sat 24 Nov 2012 19:46
by kasperhj
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>

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

Posted: Mon 26 Nov 2012 13:03
by Shalex
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.

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

Posted: Tue 27 Nov 2012 18:14
by kasperhj
It's working now, thanks.