Hi all
I'm used to using another OPF framework but enjoy learning new stuff so I thought I'd look a NHibernate in more detail.
Which document would you recommend to help me to quickly get a class persisting to a DB so that I can get an idea of how everything is put together? I started following one that looked promising but it doesn't run
http://www.devsource.com/c/a/Techniques ... bernate/1/
====
Could not compile the mapping document: NHibernateTest.BusinessClasses.Person.hbm.xml
====
Code:
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.0">
<class
name="NHibernateTest.BusinessClasses.Person, NHibernateTest.BusinessClasses"
table="Person">
<id name="ID" type="String" length="10">
<generator class="assigned"/>
</id>
<property name="Salutation" type="String" length="10"/>
<property name="GivenName" type="String" length="64"/>
<property name="FamilyName" type="String" length="64"/>
</class>
</hibernate-mapping>
namespace NHibernateTest.BusinessClasses
{
public class Person
{
public string ID { get; set; }
public string GivenName { get; set; }
public string FamilyName { get; set; }
public string Salutation { get; set; }
public string FullName
{
get { return Salutation + " " + GivenName + " " + FamilyName; }
}
}
}
Regards
Pete