private ExecuteResult<SpecialTopicCollectionResponse> Get(PagerRequest pagerRequest, SpecialTopicSortOrder sortOrder, Timestamp timestamp)
        {



            int totalCount;

            var data = _specialTopicRepository.GetPagedList(pagerRequest, out totalCount, sortOrder,
                                                            timestamp);

            var response = new SpecialTopicCollectionResponse(pagerRequest, totalCount)
            {
                SpecialTopics = MappingManager.SpecialTopicInfoResponseMapping(data).ToList()
            };




            var result = new ExecuteResult<SpecialTopicCollectionResponse> { Data = response };

            return result;
        }
 public List <SpecialTopicEntity> GetPagedList(PagerRequest pagerRequest, out int totalCount, SpecialTopicSortOrder sortOrder, Timestamp timestamp)
 {
     return
         (base.Get(Filler(DataStatus.Normal, timestamp), out totalCount, pagerRequest.PageIndex, pagerRequest.PageSize, OrderBy(sortOrder))
          .ToList());
 }
        private ExecuteResult <SpecialTopicCollectionResponse> Get(PagerRequest pagerRequest, SpecialTopicSortOrder sortOrder, Timestamp timestamp)
        {
            int totalCount;

            var data = _specialTopicRepository.GetPagedList(pagerRequest, out totalCount, sortOrder,
                                                            timestamp);

            var response = new SpecialTopicCollectionResponse(pagerRequest, totalCount)
            {
                SpecialTopics = MappingManager.SpecialTopicInfoResponseMapping(data).ToList()
            };



            var result = new ExecuteResult <SpecialTopicCollectionResponse> {
                Data = response
            };

            return(result);
        }
        private static Func <IQueryable <SpecialTopicEntity>, IOrderedQueryable <SpecialTopicEntity> > OrderBy(SpecialTopicSortOrder sortOrder)
        {
            Func <IQueryable <SpecialTopicEntity>, IOrderedQueryable <SpecialTopicEntity> > orderBy = null;

            switch (sortOrder)
            {
            default:
                orderBy = v => v.OrderByDescending(s => s.CreatedDate);
                break;
            }

            return(orderBy);
        }