public DataSourceResult Search(int patientId, string searchText) { PatientConsultationDtoResult response = _PhekoServiceClient.GetPatientConsultations(patientId, searchText); return(new DataSourceResult() { Total = response.Models.Count(), Data = response.Models.Select(item => _PatientConsultationViewModelMapper.MapToPatientConsultationViewModel(item)).ToList <PatientConsultationViewModel>() }); }
public DataSourceResult <PatientConsultationViewModel> Search(int patientId, string searchText, int pageIndex, int pageSize) { ModelPager modelPager = new ModelPager() { PageIndex = pageIndex, PageSize = pageSize, IncludeAll = false, SortOrder = SortOrder.DESCENDING, OrderColumn = "StartDate" }; PatientConsultationDtoResult response = _PhekoServiceClient.GetPatientConsultations(patientId, searchText, modelPager); return(new DataSourceResult <PatientConsultationViewModel>() { Total = response.Total, Data = response.Models.Select(item => _PatientConsultationViewModelMapper.MapToPatientConsultationViewModel(item)).ToList <PatientConsultationViewModel>() }); }