流利Nhibernate没有Persistor类名称 [英] Fluent Nhibernate No Persistor for Class Name

查看:174
本文介绍了流利Nhibernate没有Persistor类名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

即使我所有的映射都非常简单和正确,我仍然得到这个错误。
我只在选择的类上得到这个错误。有人可以帮忙吗?

解决方案

由于这个类不公开,只需将课程更改为公开课程即可。但是,如果您不想在程序集外部暴露程序集,则仍然可以将构造函数标记为内部。

唯一的缺点是,这个类在intellisense中出现。但是,如果您尝试使用它,则会出现编译时错误。所以这不应该是一个问题。

更多详情
http://weblogs.asp.net/chanderdhall/archive/2010/09/09/no-persister-for-lt-classname-gt。 aspx


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?

解决方案

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

这篇关于流利Nhibernate没有Persistor类名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆