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