Table of Contents

Class InlineCountQueryOption

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

Represents the value of the $inlinecount query option and exposes a way to retrieve the number of entities that satisfy a query.

public class InlineCountQueryOption
Inheritance
InlineCountQueryOption
Inherited Members

Constructors

InlineCountQueryOption(string, ODataQueryContext)

Initializes a new instance of the InlineCountQueryOption class.

public InlineCountQueryOption(string rawValue, ODataQueryContext context)

Parameters

rawValue string

The raw value for the $inlinecount query option.

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 $inlinecount value.

public string RawValue { get; }

Property Value

string

Value

Gets the value of the $inlinecount in a parsed form.

public InlineCountValue Value { get; }

Property Value

InlineCountValue

Methods

GetEntityCount(IQueryable)

Gets the number of entities that satify the given query if the response should include an inline count, or null otherwise.

public long? GetEntityCount(IQueryable query)

Parameters

query IQueryable

The query to compute the count for.

Returns

long?

The number of entities that satisfy the specified query if the response should include an inline count, or null otherwise.