Class ODataQueryableExtensions
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
sourceIQueryableThe queryable sequence to compile.
Returns
- ODataQueryCompilation
The compiled query representation.
Exceptions
- ArgumentNullException
Thrown when
sourceis 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
sourceIQueryable<TEntity>The queryable sequence to extend.
navigationPropertiesstring[]Names of the navigation properties to expand.
Returns
- IQueryable<TEntity>
A new IQueryable<T> instance that includes the requested expansions.
Type Parameters
TEntityType of the entity described by the query.
Exceptions
- ArgumentNullException
Thrown when
sourceornavigationPropertiesis null.- ArgumentException
Thrown when
navigationPropertiesis empty or contains invalid entries.