I use kendo grid MVC in my asp.net mvc application and in read of grid i use this model
public ActionResult Read([DataSourceRequest] DataSourceRequest request, string sWorkPeriodId, string eWorkPeriodId, string personId)
and in general i use this code to execute my query and return data to grid
var dataLists = fdata.ToDataSourceResult(request);
fdata is:
var fdata = _session.Query<WfTask>();
but in other cases like this one i don't have queryable i have to get data from a api service and use list :
var profile = JsonConvert.DeserializeObject<IEnumerable<PersonDetailInfoViewModel>>(resultApi);
var result=(from t in flowData join personDetailInfoViewModel in profile on t.wfhistory.Actor.Id equals personDetailInfoViewModel.PersonId orderby t.wfhistory.StepNo)
so what's wrong with second one, second one if I don't have filtering of grid or sorting in detasource request I have to retrieve all profile data and use result.ToDataSourceResult(request); which makes my query slow because data on profile is more than 18000 and for each request I have to get them all but if I have filters and sorts in request object I can read less data As a Result the speed of query increases.so who can i pars data of DataSourceRequest to send as a parameter to api?