The AjGenesis Code Generation project is hosted on CodePlex (http://ajgenesis.codeplex.com/), and according to its author:
AjGenesis is an open software project that generates any text artifact, starting from free Models and Templates.
These templates are model-driven from XML, so your model is stored in a well-formed XML file and the rest of the data layer (including the SQL for the database) is generated.
Simply put, this generator lets you define your own models and templates, so you can generate from any XML document you want.
There is an example of generating an NHibernate data layer (including the project) using your hbm.xml
mapping files at http://ajlopez.wordpress.com/2009/11/22/generating-code-with-ajgenesis-using-nhibernate-hbm-files/.
The templates included in the example follow a very basic construction, much like the CodeSmith or MyGeneration style templates. Anything that needs to be rendered directly, such as the using
statement, is simply entered in the template directly...