MappingException: No persister for - NHibernate - Persisting an Adapter [duplicate]

孤街醉人 提交于 2019-12-02 07:09:34

Just for completeness (also based on my painful experience), there are mostly three reasons of this exception:

  1. xml mapping file is NOT makred as Embedded Resource
  2. xml file is not part of .dll which is configured as the mapping source <mapping assembly="MyProject.Data" /> (see <session-factory> configuration)
  3. xml file does not have the default suffix .hbm.xml

One of these is usually the culprit of the: MappingException: No persister for...

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!