Skip to main content
2 de 4
adicionou 12 caracteres ao conteúdo
Leonel Sanches da Silva
  • 89,6mil
  • 9
  • 125
  • 233

Erro ao usar EF6 CodeFirst com Mysql

Estou com o seguinte erro quando rodo o Migrations:

The type initializer for 'System.Data.Entity.Migrations.DbMigrationsConfiguration`1' threw an exception.

Como posso resolver? Estou com tudo devidamente instalado. Segue meu Web.Config:

<connectionStrings>
  <add name="NortaoCultContext" providerName="MySql.Data.MySqlClient" connectionString="Data Source=server=127.0.0.1; port=3306; Initial   Catalog=NortalCultContex; uid=root; pwd=renan010203;" />
</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" />
  </providers>
</entityFramework>
user37440