如果我有这样的查询:
var results = from j1 in context.users
join j2 in context.points on j1.UserId equals j2.UserId
join j3 in context.addresses on j1.UserId equals j3.UserId
select new { j1.Username, j2.points, j3.address1 }
现在,如果我想按以下方式分组:
var results = from j1 in context.users
join j2 in context.points on j1.UserId equals j2.UserId
join j3 in context.addresses on j1.UserId equals j3.UserId
group j1 by j1.CountryCode into g1
select new { j1.Username, j2.points, j3.address1 }
所以当我分组时,似乎我必须使用'into'关键字,我猜它会进行某种投影?现在我不确定如何引用 j1.Username、j2.points 了??我看到有一个“键”属性,但它不允许我导航到列。
分组后如何访问加入的列?