Table of Contents

Class SkipQueryOption

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

This defines a $skip OData query option for querying.

public class SkipQueryOption
Inheritance
SkipQueryOption
Inherited Members

Constructors

SkipQueryOption(string, ODataQueryContext)

Initialize a new instance of SkipQueryOption based on the raw $skip value and an EdmModel from ODataQueryContext.

public SkipQueryOption(string rawValue, ODataQueryContext context)

Parameters

rawValue string

The raw value for $skip query. It can be null or empty.

context ODataQueryContext

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

Properties

Context

Gets the given ODataQueryContext.

public ODataQueryContext Context { get; }

Property Value

ODataQueryContext

RawValue

Gets the raw $skip value.

public string RawValue { get; }

Property Value

string

Validator

Gets or sets the Skip Query Validator.

public SkipQueryValidator Validator { get; set; }

Property Value

SkipQueryValidator

Value

Gets the value of the $skip as a parsed integer.

public int Value { get; }

Property Value

int

Methods

ApplyTo(IQueryable, ODataQuerySettings)

Apply the $skip query to the given IQueryable.

public IQueryable ApplyTo(IQueryable query, ODataQuerySettings querySettings)

Parameters

query IQueryable

The original IQueryable.

querySettings ODataQuerySettings

The query settings to use while applying this query option.

Returns

IQueryable

The new IQueryable after the skip query has been applied to.

ApplyTo<T>(IQueryable<T>, ODataQuerySettings)

Apply the $skip query to the given IQueryable.

public IQueryable<T> ApplyTo<T>(IQueryable<T> query, ODataQuerySettings querySettings)

Parameters

query IQueryable<T>

The original IQueryable.

querySettings ODataQuerySettings

The query settings to use while applying this query option.

Returns

IQueryable<T>

The new IQueryable after the skip query has been applied to.

Type Parameters

T

Validate(ODataValidationSettings)

Validate the skip query based on the given validationSettings. It throws an ODataException if validation failed.

public void Validate(ODataValidationSettings validationSettings)

Parameters

validationSettings ODataValidationSettings

The ODataValidationSettings instance which contains all the validation settings.