If you are using Fluent NHibernate and you get the exception:
NHibernate.MappingException: Unknown entity class: Foo.Bar.Baz
Make sure your mapping file (BazMap in this example) is public.
If you still get the exception, make sure you are loading you class maps correctly. It should look something like this:
Configuration configuration = new Configuration().Configure();
var persistenceModel = new PersistenceModel();
var sessionFactory = configuration.BuildSessionFactory();
PersistenceModel is located in the FluentNHibernate namespace.