We used to use CodeSmith to generate our NHibernate hbms, our entities, and a few other things. After a while we got sick of this flow so we ditched it.
The T4 generator is free and worth looking into for generation.
We still use the Castle CodeGenerator for MonoRail link generation.