C# Fluent NHibernate显示未使用给定的propertyname

C# Fluent NHibernate显示未使用给定的propertyname,c#,nhibernate,fluent-nhibernate,fluent-nhibernate-mapping,C#,Nhibernate,Fluent Nhibernate,Fluent Nhibernate Mapping,我正在尝试映射类中的以下受保护集合: public class AddressList { protected readonly IList<Address> addresses = new List<Address>(); } 但正如你在启示录中所看到的,我声明它应该寻找的propertyname应该是“addresses” 我发现了一个问题,用户似乎和我有同样的问题,只是这是一个老问题 我还尝试了给出的解决方案您不应该将lambdas与Reveal一起使用

我正在尝试映射类中的以下受保护集合:

public class AddressList
{
    protected readonly IList<Address> addresses = new List<Address>();
}
但正如你在启示录中所看到的,我声明它应该寻找的propertyname应该是“addresses”

我发现了一个问题,用户似乎和我有同样的问题,只是这是一个老问题


我还尝试了给出的解决方案

您不应该将lambdas与
Reveal一起使用

正如您在异常消息中看到的:

NHibernate.MappingException:无法编译映射文档: (XmlDocument)>NHibernate.PropertyNotFoundException :在类中找不到属性“成员””的getter

我尝试映射到名为
Member
的字段,因为您使用
list=>Reveal.Member
而不仅仅是
Reveal.Member

OMFG谢谢(我是个真正的白痴,有徽章吗?:)
HasMany<Address>(list => Reveal.Member<AddressList>("addresses"));
NHibernate.MappingException : Could not compile the mapping document: 
(XmlDocument) > NHibernate.PropertyNotFoundException 
: Could not find a getter for property '**Member**' in class