How can I paramaterise a T4 template to produce the same structure for different types?
I am building a T4 template that will build a POCO from a LINQ to SQL entity, but right now it produces one POCO file based on one L2S entity. How can I reuse this remplate to iterate through all L2S entities a开发者_如何学Cnd produce a POCO for each one, or for any chosen one?
Take a look at http://t4toolbox.codeplex.com. You may want to read the tutorial articles that show you how to generate multiple files and check out the L2S generator.
Oleg
精彩评论