0条评论
还没有人评论过~
我要找到爸爸和他的所有性别为男的孩子
public List<爸爸> test123(int id)
{
var a = _爸爸Repository.GetAll()
.Where(t=>t.Id==id&& t.孩子.Any(c=>c.性别== 性别.男))
.Include(t => t.孩子).ToList();
return a;
}
我这样写赛选没起到作用,结果里依然有男有女.
很明显 缺少 最后的 Select 重建(去掉非男孩的代码)