Table of Contents

Class ODataQueryableExtensions

Namespace
Utils.OData.Linq
Assembly
Utils.OData.dll

Provides extension methods for working with OData LINQ queries.

public static class ODataQueryableExtensions
Inheritance
ODataQueryableExtensions
Inherited Members

Methods

CompileToODataQuery(IQueryable)

Compiles the provided queryable sequence into an ODataQueryCompilation.

public static ODataQueryCompilation CompileToODataQuery(this IQueryable source)

Parameters

source IQueryable

The queryable sequence to compile.

Returns

ODataQueryCompilation

The compiled query representation.

Exceptions

ArgumentNullException

Thrown when source is null.

InvalidOperationException

Thrown when the query provider is not an ODataQueryProvider.

Expand<TEntity>(IQueryable<TEntity>, params string[])

Requests the expansion of the specified navigation properties in the resulting OData query.

public static IQueryable<TEntity> Expand<TEntity>(this IQueryable<TEntity> source, params string[] navigationProperties)

Parameters

source IQueryable<TEntity>

The queryable sequence to extend.

navigationProperties string[]

Names of the navigation properties to expand.

Returns

IQueryable<TEntity>

A new IQueryable<T> instance that includes the requested expansions.

Type Parameters

TEntity

Type of the entity described by the query.

Exceptions

ArgumentNullException

Thrown when source or navigationProperties is null.

ArgumentException

Thrown when navigationProperties is empty or contains invalid entries.