NHibernate.MappingException: No persister for: XYZ

Sounds like you forgot to add a mapping assembly to the session factory configuration..

If you’re using app.config…

.
.
    <property name="show_sql">true</property>
    <property name="query.substitutions">true 1, false 0, yes 'Y', no 'N'</property>
    <mapping assembly="Project.DomainModel"/>  <!-- Here -->
</session-factory>
.
.

Leave a Comment