ODataQueryOptions Class

Definition

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

[Microsoft.AspNet.OData.ODataQueryParameterBinding]
public class ODataQueryOptions
[<Microsoft.AspNet.OData.ODataQueryParameterBinding>]
type ODataQueryOptions = class
Public Class ODataQueryOptions
Inheritance
ODataQueryOptions
Derived
Attributes

Constructors

ODataQueryOptions(ODataQueryContext, HttpRequest)

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

ODataQueryOptions(ODataQueryContext, HttpRequestMessage)

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

Properties

Apply

Gets the ApplyQueryOption.

Context

Gets the given ODataQueryContext

Count

Gets the CountQueryOption.

Filter

Gets the FilterQueryOption.

IfMatch

Gets the ETag from IfMatch header.

IfNoneMatch

Gets the ETag from IfNoneMatch header.

OrderBy

Gets the OrderByQueryOption.

RawValues

Gets the raw string of all the OData query options

Request

Gets the request message associated with this instance.

SelectExpand

Gets the SelectExpandQueryOption.

Skip

Gets the SkipQueryOption.

SkipToken

Gets the SkipTokenQueryOption.

Top

Gets the TopQueryOption.

Validator

Gets or sets the query validator.

Methods

ApplyTo(IQueryable)

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

ApplyTo(IQueryable, AllowedQueryOptions)

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

ApplyTo(IQueryable, ODataQuerySettings)

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

ApplyTo(IQueryable, ODataQuerySettings, AllowedQueryOptions)

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

ApplyTo(Object, ODataQuerySettings)

Applies the query to the given entity using the given ODataQuerySettings.

ApplyTo(Object, ODataQuerySettings, AllowedQueryOptions)

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

GenerateStableOrder()

Generates the Stable OrderBy query option based on the existing OrderBy and other query options.

IsSupportedQueryOption(String)

Check if the given query option is the supported query option.

IsSystemQueryOption(String)

Check if the given query option is an OData system query option using $-prefix-required theme.

IsSystemQueryOption(String, Boolean)

Check if the given query option is an OData system query option.

LimitResults<T>(IQueryable<T>, Int32, Boolean)

Limits the query results to a maximum number of results.

LimitResults<T>(IQueryable<T>, Int32, Boolean, Boolean)

Limits the query results to a maximum number of results.

Validate(ODataValidationSettings)

Validate all OData queries, including $skip, $top, $orderby and $filter, based on the given validationSettings. It throws an ODataException if validation failed.

Applies to