public IHttpActionResult Get(int currentPage, int pageSize, string types, string key) { PageInfo pageInfo = new PageInfo() { PageIndex = currentPage, PageSize = pageSize, OrderField = "DiseaseCode", Order = OrderEnum.desc }; var list = repository.GetDiseaseList(pageInfo, GetDiseaseType(types), key); Response <IEnumerable <Disease> > response = new Response <IEnumerable <Disease> > { Data = list, PagesCount = pageInfo.Total / pageSize }; return(Ok(response)); }