I am using Entity Framework 6 in my APS.NET 4.5 web application.
When running the following command:
using (var db = new booksEnteties())
{
var books = from b in db.books
select b;
}
I get the following error:
An exception of type 'System.Configuration.ConfigurationErrorsException' occurred in System.Configuration.dll but was not handled in user code
In the Details:
Unrecognized attribute 'name'.
And it pointing me to the web.config line 111:
<remove name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" />
When I removed this line and try to run again, I get the following error:
An error occurred creating the configuration section handler for system.data: Column 'InvariantName' is constrained to be unique. Value 'MySql.Data.MySqlClient' is already present.
I assume that is something related to the Entity Framework 6 configuration in the web.config.