T4 templates have proven to be useful is a whole range of scenarios, and more and more developers are finding interesting things to do with them. For the most part, all those scenarios fall under two very distinct categories: ?support code? versus one-time generation. Unlike my previous post on CodeDom vs. T4 , here we?re not talking about making a choice between two competing technologies, but simply about using T4 in the way that makes sense for a given scenario. Let?s start with a brief description of the two usage patterns: Support code : here, a T4 template generates a file that you rarely need to look at, and you should never modify. Instead, it contains ?support code? that you can code against. A great example of this...(read more) ...
Go to the complete details ...