The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

RobReno (7) [Avatar] Offline
In Visual Studio 2012 the ADO.NET Entity Data Model template behaves differently than in Visual Studio 2010. So here is a heads up for those who might run into this issue.

The EF Designer in Visual Studio 2012 also has some new features:

DbContext code generation for new models means that any new models created using the EF Designer will generate
a derived DbContext and POCO classes by default. You can always revert to ObjectContext code generation if needed.
Existing models will not automatically change to DbContext code generation.

Solution Here:

1. Delete .tt files
2. Regenerate EDM Model from database
3. Change Code Generatin Strategy to Default and compile

This switches from DbContext back to ObjectContext