title: T4 nested templates with multiple file output
body: <p>I have a template that reads from database the tables needed to be generated as and objects. there is no problem in that, the template does generate the related file each one alone in a cs file (great) i use TemplateFileManager2.1 to achieve that. here in the tables loop i would like to call another template to create the Interface needed for that table using the tablename in the loop and put out that interface in a different file.  </p>
  
  <pre><code>foreach (var table in tables)
      {  
          if(table.name !="sysdiagrams")
          {
          var manager2 = TemplateFileManager.Create(this);
              manager2.StartNewFile(table.name+"mm.cs","Generator","Deneme"); 
              InterfaceGeneratora(table.name);
              manager2.Process();
              manager2=null;
  
  
          manager.StartNewFile(table.name+".cs","Generator","GeneratedTables"); 
  </code></pre>
  
  <p>here manager object is used to out put the tables class and manager2 is for the Interfaces. the poit here is when manager2 is called and InterfaceGeneratora(table.name); runs manager2 start to replace the created tableinterface with the new table intefarce and at the end i have all table class created well but i have just the last table interface in hand. any help is appreciated. </p>