我有两个类,分别是Role和AclRelations。在角色实体中包含AclRelations之后,我想使用IsActive属性过滤AclRelations。如何在查询中添加包含过滤器? (我使用EF-Core)
var roleEntity = this._unitOfWork.GetRepository<RoleEntity>().GetPagedList(
b => b //selector
, role => role.Id == new Guid("6FE68340-933C-4F94-64FA-08D68EBA5E79") && role.IsActive // predicate
, null //order
,roles => roles.Include(role => role.AclRelations).ThenInclude(aclRel => aclRel.Acl) //includes
);