Sample Header Ad - 728x90

How to group by linq based on input parameter?

-2 votes
1 answer
835 views
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