I have list with:
EMP_ID | UPDATED_DATE | MARK ------ | ------------ | ---- 111 | 01/01/2015 | 99 111 | 01/01/2013 | 85 111 | 01/01/2017 | 80 222 | 01/01/2011 | 70 222 | 01/01/2015 | 55 222 | 01/01/2002 | 60
I have to select one row for each ID, with the latest UPDATED_DATE, In our etc:
EMP_ID | UPDATED_DATE | MARK ------ | ------------ | ---- 111 | 01/01/2017 | 80 222 | 01/01/2015 | 55
This is the code for order:
empMarksList.OrderBy(x=>x.EMP_ID).ThenBy(y=>y.UPDATED_DATE)