ActiveSnippets - Imagine Visual Studio 2005 snippets, but with the full power of CodeSmith available to execute any logic or access any complex metadata (including database schema and xml data) to control the output of your snippets.
Step 1 of an ActiveSnippet is to create a CodeSmith Template. This shows an example of template that will create all of the properties for a table in C#. This template also shows how CodeSmith already has plenty of helper types, like the StringUtil and ScriptUtil classes.