NHibernate.MappingException: No persister for: XYZ

后端 未结 16 1087
天命终不由人
天命终不由人 2020-12-01 03:24

Now, before you say it: I did Google and my hbm.xml file is an Embedded Resource.

Here is the code I am calling:

16条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-01 03:43

    I got this off of here:

    In my case the mapping class was not public. In other words, instead of:

    public class UserMap : ClassMap  // note the public!
    

    I just had:

    class UserMap : ClassMap
    

提交回复
热议问题