查询嵌套实体集合

时间:2018-06-15 16:05:45

标签: c# linq lambda

有没有人可以帮助我,我不知道如何只从嵌套实体中选择未删除的卡片。

  var userCardSetList1 = _cardSetRepository.GetMany(
                x => x.Include(c => c.Card).ThenInclude(ca => ca.CardAnswer),
                x => x.UserId == UserId &&
                     x.IsDeleted == false &&
                     x.Card.Any(c => c.IsDeleted == false));

谢谢

0 个答案:

没有答案