[导入]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张图

 设计界面

属性值可以设置

 

最终 生成的配置文件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>


posted on 2007-05-12 22:53  hello csharp  阅读(524)  评论(0编辑  收藏  举报

导航