I am using EF6 with MySQL (MySql.Data 6.8.3). In an MVC 5.1 website. Visual Studio 2013. Packages: MiniProfiler 3.0.10-beta7 and MiniProfiler.EF6 3.0.10-beta4
When initializing Miniprofiler with MiniProfilerEF6.Initialize();
the following error occurs:
Unable to define EFProfiledDbProviderServices class of type ‘MySqlProviderServices’. Please check that your web.config defines a <DbProviderFactories>
section underneath <system.data
>
After reading the error message I added DBProviderFactories to web.config but the error remains.
I am unsure if this addition is correct or if there are other steps I need to take.
My web.config is as follows:
<entityFramework codeConfigurationType="MySql.Data.Entity.MySqlEFConfiguration, MySql.Data.Entity.EF6">
<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>
<system.data>
<DbProviderFactories>
<remove invariant="MySql.Data.MySqlClient" />
<add name="MySQL" description="ADO.Net driver for MySQL" invariant="MySql.Data.MySqlClient" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data"/>
</DbProviderFactories>
</system.data>
I have two database connections. One for my edmx (standard System.Data.EntityClient) and one for aspnet.Identity (basic DB connection string)
Any help is most appreciated!