This was a tricky one. I was just watching Scott Hanselmans session from MIX 11 “Microsofts Web Stack Of Love” and as always the guys it totally brilliant. It’s like stand up mixed with development. Anyway, he talked a bit about MVC Scaffolding and about how awesome it was. I fired up Visual Studio and installed MVCScaffolding via NuGet added some EF Models and boom! This was what i saw.
The type was not mapped. Check that the type has not been explicitly excluded by using the Ignore method or NotMappedAttribute data annotation. Verify that the type was defined as a class, is not primitive, nested or generic, and does not inherit from EntityObject.
Hmm, that was not what i expected. Turns out that i had not installed Entity Framework 4.1 completely. I found this post and i had the exact same problem. Just download Entity Framework from here and everything should work as excpected. Now back to the session!