3
In my application using Asp.net mvc, with Entity Framework 6, with Mysql, when trying to add the Controllers, with Views, using EPH, I have the following error:
Settings of my web config.:
<connectionStrings>
<add name="MyEntities" connectionString="metadata=res://*/Models.Model.csdl|res://*/Models.Model.ssdl|res://*/Models.Model.msl;provider=MySql.Data.MySqlClient;provider connection string="server=MeuServer;user id=MeuUsuario;password=******;persistsecurityinfo=True;database=MeuDatabase"" providerName="MySql.Data.MySqlClient"/>
</connectionStrings>
<entityFramework>
<defaultConnectionFactory type="MySql.Data.Entity.MySqlConnectionFactory, MySql.Data.Entity.EF6"/>
<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>
How can I solve this problem? Thank you.
NOTE
When trying to create a controller unused EPH, and add the Views manually, using template same error occurs.
I’m not sure, but try commenting on this line:
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer"/>
– Leonel Sanches da Silva
Had already tried this, and did not solve, I noticed that the error occurs during scaffolding.
– Erico Souza
Well, you have a way of putting this project in a version control so I can take a look?
– Leonel Sanches da Silva