0
<?xml version="1.0"?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" assembly="HibernateCollaborator.Core" namespace="HibernateCollaborator.Core" default-access="property" default-cascade="none" default-lazy="false" auto-import="true" >
  <class name="ProjectRole" table="ProjectRoles" lazy="false">
    <id name="ID" column="ID" type="Int32" unsaved-value="0">
      <generator class="native" />
    </id>
    <property name="Name" type="string" length="30" not-null="true">
      <column name="Name" sql-type="varchar" length="30" not-null="true"/>
    </property>
    <property name="Permission" type="byte"  not-null="true">
      <column name="Permission" sql-type="tinyint"  not-null="true"/>
    </property>
    <bag name="ProjectParticipations" lazy="false">
      <key column="PRoleID" />
      <one-to-many class="ProjectParticipation" />
    </bag>
  </class>
  <class name="ProjectParticipation" table="ProjectParticipations" lazy="false">
    <id name="ID" column="ID" type="Int32" unsaved-value="0">
      <generator class="native" />
    </id>
    <property name="StartDate" type="Datetime" not-null="true">
      <column name="StartDate" sql-type="datetime" not-null="true"/>
    </property>
    <property name="EndtDate" type="Datetime"  not-null="true">
      <column name="EndtDate" sql-type="datetime"  not-null="true"/>
    </property>
    <many-to-one name="ProjectRole" class="ProjectRole" column="PRoleID" not-null="true">
      <column name="PRoleID" sql-type="int" length="4" not-null="true"/>
    </many-to-one>
  </class>
</hibernate-mapping>

this is my xml file and how connect to database??
of course in web.config I have already done with conectionstrings

2
Contributors
1
Reply
2
Views
7 Years
Discussion Span
Last Post by __avd
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.