EnableQueryAttribute.ApplyQuery Method

Definition

Overloads

ApplyQuery(IQueryable, ODataQueryOptions)

Applies the query to the given IQueryable based on incoming query from uri and query settings. By default, the implementation supports $top, $skip, $orderby and $filter. Override this method to perform additional query composition of the query.

ApplyQuery(Object, ODataQueryOptions)

Applies the query to the given entity based on incoming query from uri and query settings.

ApplyQuery(IQueryable, ODataQueryOptions)

Applies the query to the given IQueryable based on incoming query from uri and query settings. By default, the implementation supports $top, $skip, $orderby and $filter. Override this method to perform additional query composition of the query.

public virtual System.Linq.IQueryable ApplyQuery (System.Linq.IQueryable queryable, Microsoft.AspNet.OData.Query.ODataQueryOptions queryOptions);
abstract member ApplyQuery : System.Linq.IQueryable * Microsoft.AspNet.OData.Query.ODataQueryOptions -> System.Linq.IQueryable
override this.ApplyQuery : System.Linq.IQueryable * Microsoft.AspNet.OData.Query.ODataQueryOptions -> System.Linq.IQueryable
Public Overridable Function ApplyQuery (queryable As IQueryable, queryOptions As ODataQueryOptions) As IQueryable

Parameters

queryable
IQueryable

The original queryable instance from the response message.

queryOptions
ODataQueryOptions

The ODataQueryOptions instance constructed based on the incoming request.

Returns

Applies to

ApplyQuery(Object, ODataQueryOptions)

Applies the query to the given entity based on incoming query from uri and query settings.

public virtual object ApplyQuery (object entity, Microsoft.AspNet.OData.Query.ODataQueryOptions queryOptions);
abstract member ApplyQuery : obj * Microsoft.AspNet.OData.Query.ODataQueryOptions -> obj
override this.ApplyQuery : obj * Microsoft.AspNet.OData.Query.ODataQueryOptions -> obj
Public Overridable Function ApplyQuery (entity As Object, queryOptions As ODataQueryOptions) As Object

Parameters

entity
Object

The original entity from the response message.

queryOptions
ODataQueryOptions

The ODataQueryOptions instance constructed based on the incoming request.

Returns

The new entity after the $select and $expand query has been applied to.

Applies to