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

entity-framework

Question

I have a problem when I got the lasted .edmx.

I get a message that says Error 11007: Entity type 'pl_Micro' s not mapped. Looking at the designer view, I do see that this table does indeed exist.

How can I overcome this meesage?

1
34
11/23/2013 7:49:36 PM

Accepted Answer

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

Mapping Entities

25
2/13/2013 5:22:31 PM

Popular Answer

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.



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