public IList <Employee> GetPasswordResetList(int page = 1, string sort = "EmpId", bool sortOrder = false, string search = "", int limit = 10) { IList <PasswordReset> tempCollection = _passwordResetService.GetallUnRegistered(); // Filter employee records which have pasword link expired and haven't yet reset their password HashSet <string> PasswordCollection = new HashSet <string>(tempCollection.Where(s => (System.DateTime.Now).Subtract(s.DateCreated).Days > s.ExpiryInDays).Select(s => s.UserEmail)); IQueryable <Employee> empList = _dbContext.Employees.Where(m => PasswordCollection.Contains(m.Username)); return(GetPaginatedEmployees(empList, page, sort, sortOrder, search, limit)); }