I am using Entity Framework 5 and doing a simple query to get a few users from a table.
The SQL database is already created so I use my entities as a way to map what
Since the database is already there you will not have dbo.EdmMetadata
and dbo.__MigrationHistory
which codefirst is expecting. And to resolve this you can try to set the SetInitializer
to null.
static NameOfYourContext()
{
Database.SetInitializer(null);
}
You can see this in the comments section of the this post by Scott Gu