class CustomAdaptor extends ODataV4Adaptor {
options = {
requestType: 'get',
accept: 'application/json, text/javascript, */*; q=0.01',
multipartAccept: 'multipart/mixed',
sortBy: '$orderby',
select: '$filter', //Replaced the default $select with “$filter”
skip: '$skip',
take: '$top',
count: '$count',
search: '$search',
where: '$filter',
expand: '$expand',
batch: '$batch',
changeSet: '--changeset_',
batchPre: 'batch_',
contentId: 'Content-Id: ',
batchContent: 'Content-Type: multipart/mixed; boundary=',
changeSetContent: 'Content-Type: application/http\nContent-Transfer-Encoding: binary ',
batchChangeSetContentType: 'Content-Type: application/json; charset=utf-8 ',
updateType: 'PATCH',
localTime: false,
apply: '$apply'
};
}
|
class CustomAdaptor extends ej.data.ODataV4Adaptor {
options = {
...
search: 'filter', //Use a unique name for the search query, by ignoring the $
where: '$filter',
...
};
}
|
[EnableQuery]
public IQueryable<Orders> Get()
{
...
var querystr = HttpContext.Current.Request.QueryString; //here you will be getting the query string. Use this querystring to handle the server side operations
...
return order.AsQueryable();
}
|