ABP CORE EF 嵌套链接查询

发布时间 2023-03-30 10:54:51作者: liaer

var t = (from f in this.Repository.GetAll()
join a in (
from re in _flowInfoRelationRoleRepository.GetAll()
join rl in _userRolesRepository.GetAll() on re.RoleId equals rl.RoleId
where rl.UserId == userId
select new { re.FlowInfoId }

) on f.Id equals a.FlowInfoId
select new FlowInfoDto
{
Id = f.Id,
Code = f.Code,
Name = f.Name,
FormId = f.FormId,
FormUrl = f.FormUrl,
IsApp = f.IsApp,
Label= f.Label,
Icon= f.Icon,
}).Distinct();