Invalid object name 'dbo.EdmMetadata'

c# entity-framework-6

Question

I continue to have this problem when my programme first loads. I looked everywhere, but the only thing that worked in my environment was the code below.

Database.SetInitializer<Context>(null);

Despite having this set in the OnModelCreating function, the following error is still being generated:

System.Data.SqlClient.SqlException: Invalid object name 'dbo.EdmMetadata'. System.Data.Entity.Core.EntityCommandExecutionException: An error occurred while executing the command definition. See the inner exception for details.

1
3
3/16/2017 1:14:11 AM

Popular Answer

You should add this code in constructor of yourContext class.

2
1/11/2017 3:22:30 PM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow