Only the ReferencesAny<TOther>(Member property) overload has been deprecated. ReferencesAny<TOther>(Expression<Func<T,TOther>> memberExpression) is still perfectly valid.
It's the same type of confusion as when people claim that Enum.ToString has been deprecated. The overloads that take an IFormatProvider have been deprecated, but the other ToString overloads are fine. The problem is that Intellisense shows the member stricken-out, even though only a subset of its overloads are actually obsolete.
发布评论
评论(1)
仅不推荐使用
ReferencesAny(成员属性)
重载。ReferencesAny(Expression> memberExpression)
仍然完全有效。这与人们声称 Enum.ToString 已被弃用时的混乱类型相同。采用
IFormatProvider
的重载已被弃用,但其他ToString
重载没问题。问题在于,Intellisense 显示该成员已被剔除,尽管只有其重载的一个子集实际上已过时。有关在 Fluent NHibernate 中使用
ReferencesAny
的更多信息,请参阅我的其他答案:使用 Fluent nHibernate 映射到多个表Only the
ReferencesAny<TOther>(Member property)
overload has been deprecated.ReferencesAny<TOther>(Expression<Func<T,TOther>> memberExpression)
is still perfectly valid.It's the same type of confusion as when people claim that
Enum.ToString
has been deprecated. The overloads that take anIFormatProvider
have been deprecated, but the otherToString
overloads are fine. The problem is that Intellisense shows the member stricken-out, even though only a subset of its overloads are actually obsolete.For more information on using
ReferencesAny
in Fluent NHibernate, see my other answer: Mapping to multiple tables with Fluent nHibernate