How can one create more than one file from a T4 generator or template?
The long story is as follows.
(I hope I have my T4 terminology straight here; but, I apologize ahead of time in case I do not. Regardless, you will, I am sure, get the gist.)
I have a reusable T4 generator-file.
I create a consuming T4 template-file for each table I want to generate for, set a few properties in it, and I am done.
Done. Every place I put a template-file, I get an output CS file that has the code I want. Nice.
However, what I would rather do (maybe) is to somehow start the generation process and loop through all table names in the given database and create an output file for all tables that are "code tables", maybe identifiying a "code table"
by matching rules for a particular schema/suffix/prefix/etc.
Maybe this is too much bookkeeping. It should flag orphaned output files if the table no longer exists. Etc. But, maybe it would be nice.
Whatever, the crux of the matter, however, is that 1 generator-file (or perhaps one generator-file and one template-file) would need to produce >1 output file.
(It looks like Clarius http://www.visualt4.com/downloads.html may have this already or soon have it; but, I am wondering if there is any way to do it the poor-man's way, with the out-of-the-box
What do you think?
-- Mark Kamoski