Namespace cannot be found when rebuilding entity framework

asp.net-mvc-3 entity-framework

Question

I've rebuilt my entity framework in an MVC 3 project. This was working before I did this. Now though, I get the error:

The type or namespace name 'myEntities' could not be found (are you missing a using directive or an assembly reference?)    

everywhere in my code where it references the Entity Framework. This was working before the rebuild so it follows that it has to be that. I've checked that the name of the connection in my web.config and have deleted and re-installed the entity framework but it's not being referenced.

Any ideas how to fix this error?

1
0
8/6/2013 8:34:01 PM

Accepted Answer

Lo and behold, it was simple. I named the connection string to a different name than the object name I call in my code!

1
8/6/2013 9:30:35 PM

Popular Answer

I solved this problem by deleting all tables from Entity .edmx then right click and select update model from database and select all tables you want ,Next rebuild 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