Invalid object name 'dbo.EdmMetadata'

c# entity-framework-6

Question

I keep getting this error on initial load of my application. I have searched high and low and the only thing I found to do was the code below in my context.

Database.SetInitializer<Context>(null);

I have this set in the OnModelCreating method but it is still throwing the error below:

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 your Context 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