导航查询后再左连接 Select 无法映射出导航查询出来的二级实体 返回
SqlSugar
待处理
1
415
悬赏:5 飞吻
例子:
var data = await _driverRepository.Value.AsQueryable()
.Includes(x => x.CommissionConfig)
.Includes(x => x.VicariousCallConfig)
.LeftJoin<ReferralRelation>((x, y) => x.Id == y.AccountUserId)
.Select((x, y) => new DDriver()
{
QrcodeUrl = y.QrcodeUrl ?? string.Empty,
}, true)
.ToPagedListAsync(input.Page, input.PageSize);
这个时候的DDriver实体下面的CommissionConfig 和 VicariousCallConfig无法被映射出来 只会显示出一级
热忱回答(1)
-
fate sta VIP0
2026/3/24VicariousCallConfig 要写到select中
0 回复