我是 LINQ 新手。谁能帮我将以下 SQL 查询转换为 LINQ?
SELECT
Date,ShiftName,Max(Score) AS Score, 1 AS IsPreferred
FROM
Temp_Nurse_Fill_RequestNumbers
group by
ShiftName,date
最佳答案
from t in Temp_Nurse_Fill_RequestNumbers
group by t.ShiftName, t.date
into g
select new
{
Date = g.date,
Score = (from tt in g select tt.Score).max
IsPreferred = 1
};
关于.net - 如何将SQL查询转换为LINQ?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8426208/