我有以下问题
基本上我有以下两个片段:
var contactAssociation =
session.QueryOver<ContactAssociation>(() => contactAssociationAlias)
.Where(() =>
contactAssociationAlias.Contact.ID == careGiverId &&
contactAssociationAlias.Client.ID == clientKey)
.Where(() =>
contactAssociationAlias.AclRole.RoleName == "Care Giver")
.SingleOrDefault();
和
var contactAssociation = session.Query<ContactAssociation>()
.Where(cr =>
cr.Contact.ID == careGiverId
&& cr.Client.ID == clientKey)
.Where(cr =>
cr.AclRole.RoleName == "Care Giver")
.SingleOrDefault();
第二个有效第一个输出此错误:
Message=could not resolve property: AclRole.RoleCode of:
SL.STAdmin.DAL.ContactAssociation
有人知道为什么是这样吗?先感谢您