We have adopted Nhibernate as the ermaping solution in the project. Currently, Nhibernate has released version 0.300. For details, see nhibernate.sourceforge.net. Currently, Nhibernate does not have an automatic configuration generation tool, it is annoying to generate configuration files one by one. through research, we have developed a configuration generation tool.
REFERENCE The nhibernateattribute namespace in your project. The control implements custom attributes such as nhibernateclass, nhibernateid, nhibernateproperty, handler, nhibernateonetoworkflow, listener, and nhibernatemanytoworkflow, and a configuration class automatically generated according to a type, which can automatically generate a configuration file.
A generated configuration file is as follows:
<? XML version = "1.0" encoding = "UTF-8"?>
<Hibernate-mapping xmlns = "urn: nhibernate-mapping-2.0">
<Class name = "HR. Person. cperson, HR" table = "cperson">
<Property name = "hymenealstate" type = "string (50)"/>
<Property name = "state" type = "int16"/>
<Property name = "guidperson" type = "guid"/>
<Property name = "name" type = "string (50)"/>
<Property name = "gender" type = "Boolean"/>
<Property name = "borndate" type = "datetime"/>
<Property name = "otherw.agename" type = "string (50)"/>
<Property name = "otherw.agelevel" type = "string (50)"/>
<Property name = "remark" type = "string (50)"/>
<Property name = "technicaltitle" type = "string (50)"/>
</Class>
</Hibernate-mapping>
If attributes such as nhibernateonetoone nhibernatemanytoone are configured, these definitions can also be automatically generated.
Download file: Installation File
If you have any questions, you can contact me via email: dehui.cai@hisoft.com or QQ: 19646007