public PageResult <IndexListDto> GetIndexByPage(SearchIndexParams param) { var query = this.IndexManagerRepository.Queryable().Where(x => x.IsDeleted == false && x.ServiceNumber == param.ServiceNumber) .Select(x => new IndexListDto { IndexName = x.IndexName, IndexNumber = x.IndexNumber, LastModifiedTime = x.ModifiedTime, EnumStatus = x.Status, ServiceSign = x.ServiceSign }); if (!string.IsNullOrEmpty(param.IndexName)) { query = query.Where(x => x.IndexName.Contains(param.IndexName)); } return(query.ToPageDtos(param)); }
// GET: api/IndexManager public StandardJsonResult <PageResult <IndexListDto> > GetPage([FromUri] SearchIndexParams param) { return(StandardAction(() => this.IndexManagerService.GetIndexByPage(param))); }