Question

When I created a new .edmx I got the following files under

->Model.edmx
-->Model.Context.tt
-->Model.Designercs
-->Model.edmx.diagram
-->Model.tt

A previous copy of the edmx file that was created before just has the following:

->Model1.edmx --> Model1.Designer.cs

Just wondering why the one I created has so many things underneath it while a previous copy has less.

Was it helpful?

Solution

By default VS2012 used SingleFileGenerator that created ObjectContext based context and EntityObject based entities. In VS2012 it was changed - now the code is generated with T4 templates (the .tt files) which generate your entities and context. The default entities generated in VS2012 are POCO entities and the context is DbContext based. If you want the ObjectContext back just delete the .tt files open your model in VS, right click on the designer surface and in properties change Code Generation from "None" (meaning T4 templates) to "Default" (meaning ObjectContext). The "Default" being not really the default in VS2013 was a bit confusing to people. In VS2013 we changed the names to "LegacyObjectContext" and "T4".

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top