Search found 2 matches

by SpaceIQ
Fri 08 Apr 2011 08:52
Forum: dotConnect for MySQL
Topic: Unable to determine the provider name...
Replies: 2
Views: 3313

Thank you very much. It works fine. :)
by SpaceIQ
Thu 07 Apr 2011 20:06
Forum: dotConnect for MySQL
Topic: Unable to determine the provider name...
Replies: 2
Views: 3313

Unable to determine the provider name...

Hi, I use the EF 4.1 in my ASP.NET MVC 3 project and the latest version of the Connect for MySQL Pro like:

Code: Select all

    public class SiteContext : DbContext
    {
        public SiteContext(DbConnection connection):base(connection, true)
        {
            connection.Open();
        }

        ....
    }
And have created the context:

Code: Select all

    public class HomeController : Controller
    {
        SiteContext _siteContext = new SiteContext(new MySqlConnection("server=localhost;User Id=myuser;database=mybase"));
 ...
After I have called the Create method:

Code: Select all

_siteContext.Database.Create();
And have got an exeption:
Unable to determine the provider name for connection of type 'Devart.Data.MySql.MySqlConnection'.
---

In web.config:

<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=6.10.135.0, Culture=neutral, PublicKeyToken=09af7300eec23701" />
</DbProviderFactories>
</system.data>

In References:

Devart.Data
Devart.Data.MySql
Devart.Data.MySql.Entity
Devart.Data.MySql.Web

Also I called the License Information and made all steps of the wizard.

What is wrong? Thank you.