There is an unsaved comment in progress. You will lose your changes if you continue. Are you sure you want to reopen the work item?
Creating 2 EDMXs from same DB causes 1st .tt file to "lose" nested classes
Create an EDMX called Model1.edmx from (say) Northwind importing all tables. You will create (amongst others) a Model1.tt file which will generate a .cs file for each entity Category.cs, Customer.cs etc.
Now create another EDMX called Model2.edmx from the same DB for the same tables. You will create Model2.tt. But Model2.tt also generates Category.cs, Customer.cs etc.
But part of the codegen process is to nest the generated .cs files (Category.cs, Custoemr.cs etc) under Model2.tt. This means that if you return to Model1.tt the only file now nested under that is Model1.cs. All the entity classes have been "moved"
to be nested under Model2.tt.