Udostępnij za pośrednictwem


EnableQueryAttribute.ApplyQuery Method

 

Namespace:   System.Web.Http.OData
Assembly:  System.Web.Http.OData (in System.Web.Http.OData.dll)

Overload List

Name Description
System_CAPS_pubmethod 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.

System_CAPS_pubmethod ApplyQuery(Object, ODataQueryOptions)

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

See Also

EnableQueryAttribute Class
System.Web.Http.OData Namespace

Return to top

EnableQueryAttribute.ApplyQuery Method (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.

Syntax

public virtual IQueryable ApplyQuery(
    IQueryable queryable,
    ODataQueryOptions queryOptions
)
public:
virtual IQueryable^ ApplyQuery(
    IQueryable^ queryable,
    ODataQueryOptions^ queryOptions
)
abstract ApplyQuery : 
        queryable:IQueryable *
        queryOptions:ODataQueryOptions -> IQueryable
override ApplyQuery : 
        queryable:IQueryable *
        queryOptions:ODataQueryOptions -> IQueryable
Public Overridable Function ApplyQuery (
    queryable As IQueryable,
    queryOptions As ODataQueryOptions
) As IQueryable

Parameters

Return Value

Type: System.Linq.IQueryable

Return to top

EnableQueryAttribute.ApplyQuery Method (Object, ODataQueryOptions)

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

Syntax

public virtual object ApplyQuery(
    object entity,
    ODataQueryOptions queryOptions
)
public:
virtual Object^ ApplyQuery(
    Object^ entity,
    ODataQueryOptions^ queryOptions
)
abstract ApplyQuery : 
        entity:Object *
        queryOptions:ODataQueryOptions -> Object
override ApplyQuery : 
        entity:Object *
        queryOptions:ODataQueryOptions -> Object
Public Overridable Function ApplyQuery (
    entity As Object,
    queryOptions As ODataQueryOptions
) As Object

Parameters

  • entity
    Type: System.Object

    The original entity from the response message.

Return Value

Type: System.Object

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

Return to top