Table of Contents

Class ODataQueryOptions<TEntity>

Namespace
System.Web.Http.OData.Query
Assembly
System.Web.Http.OData.dll

This defines a composite OData query options that can be used to perform query composition. Currently this only supports $filter, $orderby, $top, $skip.

[ODataQueryParameterBinding]
public class ODataQueryOptions<TEntity> : ODataQueryOptions

Type Parameters

TEntity
Inheritance
ODataQueryOptions<TEntity>
Inherited Members

Constructors

ODataQueryOptions(ODataQueryContext, HttpRequestMessage)

Initializes a new instance of the ODataQueryOptions class based on the incoming request and some metadata information from the ODataQueryContext.

public ODataQueryOptions(ODataQueryContext context, HttpRequestMessage request)

Parameters

context ODataQueryContext

The ODataQueryContext which contains the Microsoft.Data.Edm.IEdmModel and some type information

request HttpRequestMessage

The incoming request message

Methods

ApplyTo(IQueryable)

Apply the individual query to the given IQueryable in the right order.

public override IQueryable ApplyTo(IQueryable query)

Parameters

query IQueryable

The original IQueryable.

Returns

IQueryable

The new IQueryable after the query has been applied to.

ApplyTo(IQueryable, ODataQuerySettings)

Apply the individual query to the given IQueryable in the right order.

public override IQueryable ApplyTo(IQueryable query, ODataQuerySettings querySettings)

Parameters

query IQueryable

The original IQueryable.

querySettings ODataQuerySettings

The settings to use in query composition.

Returns

IQueryable

The new IQueryable after the query has been applied to.