Hi Darlington,
I just came across this on the MySQL Dev. It shows you the configuration changes you need to make together with an EF Code First sample.
http://dev.mysql.com/doc/refman/5.7/en/connector-net-entityframework60.html
hope this helps.
-Kalpesh
Darlington Adibe Wrote:
-------------------------------------------------------
> Hi Roberto,
>
> Is it possible to have a detail example of how to
> use EF6 with .NET MVC 4, I have not been able to
> use any EF with any off the version.
>
> The closest I got is with the alpha release of
> Connector/NET Version 6.8.0.0 with EF6, but then
> when I execute
>
> PM> Add-Migration InitialCreate
>
> I get the following error
>
> System.Runtime.Serialization.SerializationExceptio
> n: 'Type is not resolved for member
> 'MySql.Data.MySqlClient.MySqlException,MySql.Data,
> Version=6.8.0.0, Culture=neutral,
> PublicKeyToken=c5687fc88969c44d'
>
> I have searched the net and just can't find any
> Code-First example that works, Please if you could
> post a very simple MVC4 sample with EF6 using
> Connector/NET it will be great as I noticed from
> my search its giving alot of people like my much
> trouble.
>
> Here is my web.config
>
> <system.data>
> <DbProviderFactories>
> <clear />
> <remove invariant="MySql.Data.MySqlClient"
> />
> <add name="MySql.Data.MySqlClient"
> invariant="MySql.Data.MySqlClient"
> description=".Net Framework Data Provider for
> MySQL"
>
> type="MySql.Data.MySqlClient.MySqlClientFactory,
> MySql.Data, Version=6.8.0.0, Culture=neutral,
> PublicKeyToken=c5687fc88969c44d" />
> </DbProviderFactories>
> </system.data>
> <entityFramework>
> <defaultConnectionFactory
> type="MySql.Data.MySqlClient.MySqlClientFactory,
> MySql.Data, Version=6.8.0.0, Culture=neutral,
> PublicKeyToken=c5687fc88969c44d" />
> <providers>
> <provider
> invariantName="MySql.Data.MySqlClient"
> type="MySql.Data.MySqlClient.MySqlProviderServices
> , MySql.Data.Entity.EF6, Version=6.8.0.0,
> Culture=neutral, PublicKeyToken=c5687fc88969c44d"
> />
> </providers>
> </entityFramework>