Asp.net web api web api如何忽略ODataQueryOptions

Asp.net web api web api如何忽略ODataQueryOptions,asp.net-web-api,odata,Asp.net Web Api,Odata,我有一个没有实体框架的odata控制器 [EnableQuery] public HttpResponseMessage Get(ODataQueryOptions<TicketApp> queryOptions) { List<TicketApp> tList = new List<TicketApp>(); tList = BL.GetTickets(queryOptions); return Request.CreateRespo

我有一个没有实体框架的odata控制器

[EnableQuery]
public HttpResponseMessage Get(ODataQueryOptions<TicketApp> queryOptions)
{
    List<TicketApp> tList = new List<TicketApp>();
    tList = BL.GetTickets(queryOptions);
    return Request.CreateResponse(HttpStatusCode.OK, new PageResult<TicketApp>(tList, Request.ODataProperties().NextLink, tList.Count()));
}
更新1


如果客户端需要展开项,如果我删除EnableQuery,则需要进行交互。无法展开复杂属性。

从方法中删除
EnableQuery
属性。

解决方案如下:

使用[AutoExpand]删除带有数据批注的[EnableQuery]ad标记每个复杂属性

api/app/ticket?$top=10&$skip=20

BL.GetTickets gets 10 tikets skipping 20, the tList has 10 items

odata skip 20 and get 10 from tList