I want to use
group by
in C#, and my result must be like this code in SQL:
SELECT MAX(EffectiveDate) AS EffectiveDate,details.PersonnelBaseID
FROM dbo.tkp_PersonnelDetails AS details
where details.EffectiveDate <= @Time
GROUP BY PersonnelBaseID
@Time
is an input parameter;
assume tkp_PersonnelDetails
is a list of objects in C#.
Asked by mhd.cs
(99 rep)
Jul 12, 2019, 03:01 AM
Last activity: Nov 11, 2019, 05:02 AM
Last activity: Nov 11, 2019, 05:02 AM