EFCore 一对多连接查询

内容纲要

A对B、C

await (from e in _context.Equip
                          join c in _context.Ycp
                          on e.EquipNo equals c.EquipNo into j1
                          join x in _context.Yxp
                          on e.EquipNo equals x.EquipNo into j2
                          select new
                          {
                              Equips = e,
                              Ycs = j1.ToList(),
                              Yxs = j2.ToList()
                          }).ToListAsync();
点赞

发表评论

电子邮件地址不会被公开。 必填项已用*标注