public PageOf <ArticleInfo> Search(UserInfo user, QueryPackage queryPackage, int pageIndex, int pageSize) { var keyword = queryPackage.QueryString; var sorting = _sortingConverter.ToDomainObject(queryPackage.SortingInfo); var startDate = queryPackage.StartDate; var endDate = queryPackage.EndDate; var articles = _searchDao.Search( keyword, sorting, startDate, endDate, pageIndex, pageSize); var articleInfos = _articleConverter.ToDataTransferObject(articles); return(new PageOf <ArticleInfo>() { TotalCount = _searchDao.GetTotalCount(keyword, sorting, startDate, endDate), PageSize = pageSize, PageIndex = pageIndex, Results = articleInfos }); }