1
resposta

Curso MVC

Como posso resolver, estou tentando rodar o projeto, mas ele mostra mensagem de erro

'System.Data.Entity.Core.ProviderIncompatibleException' occurred in EntityFramework.dll but was not handled in user code

Additional information: An error occurred accessing the database. This usually means that the connection to the database failed. Check that the connection string is correct and that the appropriate DbContext constructor is being used to specify it or find it in the application's config file. See http://go.microsoft.com/fwlink/?LinkId=386386 for information on DbContext and connections. See the inner exception for details of the failure.

1 resposta

Verifica se sua string de conexão esta certa lá no web config. Lembrando que a string de conexão deve estar tanto na camada de acesso a banco como na camada de apresentação. Se estiver tudo ok, recompile o código e tente novamente.

Quer mergulhar em tecnologia e aprendizagem?

Receba a newsletter que o nosso CEO escreve pessoalmente, com insights do mercado de trabalho, ciência e desenvolvimento de software