1
我想將這個sql轉換成我的LINQ查詢,並且有很多問題。使用LINQ中的最大函數
select Heading,CreatedBy,ReleaseID, MAX(PublishDate)
from Releases
group by Heading,CreatedBy,ReleaseID
我需要在這LINQ格式使用此查詢
List<RelData> cmsPress = (from Release in dataContext.Releases
select new RelData
{
Heading = Release.Heading,
ReleaseID = Release.ReleaseID,
CreatedBy = Release.CreatedBy,
PublishDate = Release.PublishDate.ToShortDateString()
}).ToList();