After creating a new mapping file using the code mapping feature in NHibernate, it didn’t work when I tried to persist an instance of the object. Instead I got the following error message:
NHibernate.MappingException: No persister for: Sample.Product
Here is the mapping file I’m using:
Do you notice what’s wrong? ….
I forgot to make my mapping class public:
public class ProductMapping: ClassMapping<Product>