Private property mapping with fluent nhibernate

元气小坏坏 提交于 2019-12-03 14:15:29

If you follow the examples on the wiki you'll see that you're supposed to use Map(Reveal.Member<YourEntity>("m_Inactive")).

Looks like in the latest version you're supposed to use Reveal.Member since Reveal.Property is obsolete:

Map(Reveal.Member<YourEntity>("m_Inactive"))

Oh, and sort of a "duh" but you'll need to make sure you include FluentNHibernate:

using FluentNHibernate;

And another "duh" but this will work with protected members as well as private.

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