views:

64

answers:

2

I'm just starting to get into generating code from a DSL using visual studio and was looking for help in how to get one template to call multiple sub-templates.

I was also wondering if there is any merge features that make it easy to regenerate the code when you make changes to your model without loosing any code that has been added.

+1  A: 

Perhaps this will answer some of your questions regarding sub-templates: T4 Template Design. There is no support in T4 itself for merging generated code with code added manually. However, you can take advantage of partial classes and separate generated and manual code in different files.

Oleg Sych
Thanks Oleg, I watched some of the Channel nine webcasts over the weekend and I have a better feel for things now.
Mark
+1  A: 

After watching some of the channel9 videos over the weekend I now have a better insight into how to do things with the T4 templates.

If anyone else that reads this post is looking for similar guidance I'd recommend the following resources to help you get up to speed more quickly:

Hope this helps.

Mark