Fluent Nhibernate 类名没有持久性
尽管我的所有映射都非常简单且正确,但我还是收到此错误。 我仅在选定的课程上收到此错误。有人可以帮忙吗?
I am getting this error even though all my mappings are pretty simple and correct.
I get this error only on select classes. Can someone help?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
发生此错误是因为该类不是公共的。只要将类更改为 public 就不会再出现这种情况了。但是,如果您不想在程序集外部公开程序集,您仍然可以将构造函数标记为“内部”。
唯一的缺点是该类以智能感知方式显示。但是,如果尝试使用它,则会出现编译时错误。所以这应该不是问题。
了解更多详情
http:// weblogs.asp.net/chanderdhall/archive/2010/09/09/no-persister-for-lt-classname-gt.aspx
This error occurs since the class is not public. Just change the class to public and this won't occur again. However, if you do not want to expose the assembly outside the Assembly you can still mark the constructor as 'internal'.
The only downside to it is that the class shows up in intellisense. However, you would get a compile time error if you try to use it. So that should not be a problem.
For more details
http://weblogs.asp.net/chanderdhall/archive/2010/09/09/no-persister-for-lt-classname-gt.aspx