NHibernet Unable to locate persister for the entity 第一 xml文件必须为 *.hbm.xml 第二 设置xml文件为嵌入的资源,用鼠标点击右键 然后生成操作里 选择嵌入的资源即可解决。 https://www.cnblogs.com/lyj/