public List <UserDto> GetUsersByPage(GetUsersByPageDto dto) { return(ctx.Users. Where(p => dto.Status == null || p.Status == dto.Status.Value). OrderByDescending(p => p.CreatedAt). Skip((dto.PageNo - 1) * AdminSettings.Block). Take(AdminSettings.Block). Include(p => p.WorkTime). Include(p => p.Expense). Include(p => p.City).ThenInclude(p => p.Province). Include(p => p.ProfileImage). Select(p => DtoBuilder.CreateUserDto(p)). ToList()); }