I want to make a blog series about what you can do with .tt files. I do not mean now what cen be generated from edmx( I have blogged about that at
I will start from a .tt template that will be analyzing a class( the ViewModel in MVC terms ) and then, starting from this template, I will generate:
- Loading the class from config file( web / app)
- Generating resx files for translating
- Generating help / tooltip
- Generating logging for all methods ( with an _On convention)
- Generating shallow copy for the class, saving the properties and an Interface ( usually good for DI / Ioc)
I expect your suggestions too. What do you have iteratively do in your development( MVC ) more than one time for each ViewModel ( Model) class ?
( this is the .tt file)
Great idea for a series. I am amazed of how few people know about T4 and what you can do with it. Probably it has to do with the impracticality of using them in Visual Studio, where you don’t have any way of controlling when to run them in regard to compilation.