Project Description
Generates c# classes from your hbm files. Templates are easily editable
Configuration
Configuration is currently done through a XML file :
<?xml version="1.0" encoding="utf-8" ?>
<configuration project="project">
<mapping baseDirectory="c:\projects\project\Libs\project.NHibernate\Mapping" />
<templates baseTemplateDirectory="D:\projects\NHEntGen\App\EntityGenerator\Templates"
baseOutputDirecoty="D:\projects\project\Libs">
<template templateFilename="BaseEntity.st"
outputFilename="project\Entities\BaseEntity.cs"
standalone="true" />
</templates>
</configuration>
Templating
The templating engine used is
http://www.codeplex.com/SharpTemplate
Mapping files format
Currently, only very simple mapping file format is supported :
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" assembly="TestLib" namespace="TestLib.Entities">
<class name="Order" table="ORDERS">
<id name="Id" column="ORDER_ID" type="System.Int32">
<generator class="identity" />
</id>
<property name="Date" type="System.DateTime" />
<many-to-one name="Customer" class="Customer" column="CUSTOMER_ID" />
<bag name="Products" table="ORDERS_PRODUCTS">
<key column="ORDER_ID"/>
<many-to-many class="Product" column="PRODUCT_ID"/>
</bag>
</class>
</hibernate-mapping>