Reputation: 19099
I am trying to test the Entity Framework CTP 5 Code First with an existing table.
EdmMetadata
table from the database.Trusted_Connection=true;Persist Security Info=True
in my connection string.System.NotSupportedException was unhandled by user code
Message=Model compatibility cannot be checked because the database does not contain model metadata.
Source=EntityFramework
How can I make this application run without EdmMetadata
table?
Upvotes: 3
Views: 8654
Reputation: 364249
If you don't want to use EdmMetadata table try to add this into your DbContext
derived class:
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.Conventions.Remove<IncludeMetadataConvention>();
}
Upvotes: 6