i have a query that is full filling my requirement ,but problem is that when data in that table will increase then it will consume more time ,i want to alternate query in EF so that i will not get that chance. my query is as follow:
Hide Copy Code
var ranks = _service.GetAllEmployeeDuty().OrderByDescending(x => x.EndDate)
.GroupBy(x => x.Employee_Id).Select(x => x.First()
).Where(x => x.ToSector_Id == sectorId).ToList();