This is my first NHibernate application. I am trying to follow an NHibernate 1.2 HelloWorld application on VS 2008/SQL Server 2005 RTM/NHibernate 2.1.x. I have a console application and have created a database HelloNHibernate with an Employee table having three columns - ID (int), Name (varchar50), Manager (int). I am trying to add a record through NHibernate but am getting a MappingException was unhandled error. The error says "No persister for: HelloWorldNHibernate.Emplo
yee". Inner Exception is null. Gogoling the error threw up two possibilities. One, my mapping file (Employee.hbm.xml) does not have Build Action set to Embedded Resource (this I have set). Second, there must be a syntax error in the hbm file. For the life of me, I can't figure out any problems in the mapping file! Any help is appreciated!
<?xml version="1.0" encoding="utf-8" ?>
<class name="HelloWorldNHibernate.Employee" table="Employee">
<id name="ID" column="ID">
<property name="Name" column="Name"/>
<many-to-one access="field" name="Manager" column="Manager" cascade="all"/>