Automatic Configuration of Nhibernate

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.