IT:AD:EF:Concepts:DbContext versus ObjectContext
Summary
- EF4 generate a context that derived from ObjectContext and entity classes that derived from EntityObject.
- Starting with EF4.1, MS recommends swapping code generation template that generates a context deriving from DbContext and POCO entity classes.
- In Visual Studio 2012 you get DbContext code generated by default.
- Existing models will continue to generate ObjectContext based code unless you decide to swap to the DbContext based code generator.