var EmpList = _service.GetAllEmployeeDuty().OrderByDescending(x => x.EndDate).GroupBy(x => x.Employee_Id).Select(x => x.First()).ToList();
First
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)