NHibernate Mapping
Add the .hbm.xml files as "Embedded Resource".
See the Sample entities for these mapping documents. See more mapping notes
The cool kids are using fluent mapping which builds the mapping dynamically, and is refactor-friendly.
For quick-start database-driven NHibernate, check out my Database schema reader which has a simplistic code generator. It reads the database and will create NHibernate compatible POCO classes as well as the hbm mapping files.
Category
<?xml version="1.0" encoding="utf-8"?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" namespace="Northwind" assembly="Northwind">
<class name="Category" table="`Categories`">
<id name="Id" column="`CategoryID`" type="System.Int32" unsaved-value="0" access="nosetter.camelcase-underscore">
<generator class="native" />
</id>
<property name="CategoryName" column="`CategoryName`" type="System.String" length="15" not-null="true" />
<property name="Description" column="`Description`" type="System.String" length="1073741823" />
<property name="Picture" column="`Picture`" type="System.Byte[]" />
<bag name="ProductCollection" access="nosetter.camelcase-underscore" table="`Products`" cascade="all-delete-orphan" inverse="true">
<key column="`CategoryId`" foreign-key="FK_Products_Categories" />
<one-to-many class="Product" />
</bag>
</class>
</hibernate-mapping>
Product
<?xml version="1.0" encoding="utf-8"?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" namespace="Northwind" assembly="Northwind">
<class name="Product" table="`Products`">
<id name="Id" column="`ProductID`" type="System.Int32" unsaved-value="0" access="nosetter.camelcase-underscore">
<generator class="native" />
</id>
<property name="ProductName" column="`ProductName`" type="System.String" length="40" not-null="true" />
<!--<many-to-one name="Supplier" column="`SupplierID`" class="Supplier" not-found="ignore" />-->
<many-to-one name="Category" column="`CategoryID`" class="Category" not-found="ignore" />
<property name="QuantityPerUnit" column="`QuantityPerUnit`" type="System.String" length="20" />
<property name="UnitPrice" column="`UnitPrice`" type="System.Decimal" />
<property name="UnitsInStock" column="`UnitsInStock`" type="System.Int16" />
<property name="UnitsOnOrder" column="`UnitsOnOrder`" type="System.Int16" />
<property name="ReorderLevel" column="`ReorderLevel`" type="System.Int16" />
<property name="Discontinued" column="`Discontinued`" type="System.Boolean" not-null="true" />
</class>
</hibernate-mapping>