[导入]Nhibernate引入自定义Membership和Role

Custom Membership and Role Providers using NHibernate

该工程已经迁入CodePlex

地址 http://www.codeplex.com/nhibernateprovider

 

NHibernate Plugin for Visual Studio 2005

这个Nhibernate插件也可以用用。图形化设计生成hbm.xml文件和实体类

感觉还不错。如何使用可以看看Getting Started with NHibernate Plug-in for Visual Studio 2005

截2张图

 设计界面

[导入]Nhibernate引入自定义Membership和Role

属性值可以设置

[导入]Nhibernate引入自定义Membership和Role

 

[导入]Nhibernate引入自定义Membership和Role

最终 生成的配置文件Archives.hbm.xml

<hibernate-mapping default-cascade="none" xmlns="urn:nhibernate-mapping-2.2">
  <class name="WindowsApplication1.Archives, WindowsApplication1" table="Archives">
    <id name="id" type="System.Int32" column="id" unsaved-value="0">
      <generator class="native" />
    </id>
    <property name="Name" type="System.String" column="name" not-null="false" length="50" />
    <property name="CreateDate" type="System.DateTime" column="createDate" not-null="false" />
  </class>
</hibernate-mapping>


你可能感兴趣的:(Hibernate)