0
您好我正在使用下面的查询来选择studentId和Score1从table1现在我想选择用户,我从table2选择他们的ID,我怎么可以选择它与ID? 我可以选择用户与此查询from v in dc.tbl_Students select v
但我想选择一些用户,我有他们的ID。从linq中选择一些ID
var qBestMan = (from T in (((from tbl_ActPoints in dc.tbl_ActPoints
select new
{
StudentId = (int?)tbl_ActPoints.StudentId,
Score = (int?)tbl_ActPoints.Score
}).Concat(
from tbl_EvaPoints in dc.tbl_EvaPoints
select new
{
StudentId = (int?)tbl_EvaPoints.StudentId,
Score = (int?)tbl_EvaPoints.Score
})))
group T by new
{
T.StudentId
} into g
orderby g.Sum(p => p.Score) descending
select new
{
g.Key.StudentId,
HighScoreUser = g.Sum(p => p.Score)
}).ToArray();