Entity Framework - Error 11007: Entity type is not mapped.

I get this error when I move a database table to a different schema or delete a database table. In this case Entity Framework doesn't seem to update the edmx file correctly when you Update Model from Database....

The way I resolved this was to do a text search for the name of the offending entity. I then removed all references to this in the xml view of the edmx file, deleted the corresponding cs file that defines the entity, and any other references in the project.


This error was passed to me by the SQL Server Authentication server did not have the necessary permissions and could not see the entities.

Confirm that your sql user has the necessary permissions in the database.


From MSDN:

Error 11007: Entity Type Is Not Mapped

This error occurs when an entity type in the conceptual model is not mapped to the data source. To resolve this error, map the entity type to the data source. Look at the MSDN link

How to: Map Entities to Database Tables