Blog: NHibernate Mapping Exception: Unknown Entity Class
By AzamSharp
Views: 1199


I started using NHibernate and I keep on getting the following error:

MappingException: Unkown Entity Class [ClassName]

I check my mapping hbm.xml files several times but could not figure out the problem. Finally, I found out that the problem was not in the hbm file but it was because I was not setting the hbm file as an embedded resource. I simply right clicked on the hbm file and selected properties and set the "Build Action" to "Embedded Resource". That's it problem solved!
By AzamSharp


Enter Comment/Feedback
  •  
  •  
  •  
  •  
  •  

Comments/Feedbacks
Subject: Use
Name: Rui
Date: 10/13/2007 11:58:01 AM
Comment:
Try to add the following line in configuration file inside the tag:



Example:



This worked for me.

The problem is that in the tutorial of NHibernate documentation, this line isnt included.




Join WebHost4Life.com






Copyright GridViewGuy 2007-2008