Show / Hide Table of Contents

Class QueryableExtensions

Useful extension methods for System.Linq.IQueryable.

Inheritance
Object
QueryableExtensions
Inherited Members
System.Object.ToString()
Object.Equals(Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
Object.MemberwiseClone()
Namespace: IRM
Assembly: IRM.dll
Syntax
public static class QueryableExtensions

Methods

Aggregate<T>(IQueryable<T>, Query)

Creates requested aggregate results from the source.

Declaration
public static IEnumerable<AggregateResult> Aggregate<T>(this IQueryable<T> source, Query query)
Parameters
System.Linq.IQueryable<T> source

The source to aggregate over.

Query query

The Query object with the aggregating requests.

Returns
IEnumerable<AggregateResult>

A collection of AggregateResult.

Type Parameters
T

The type of objects to enumerate.

AsQueryResult<T>(IQueryable<T>, FilterQuery)

Creates a filtered, sorted and paged QueryResult<T> from the source and FilterQuery.

Declaration
public static QueryResult<T> AsQueryResult<T>(this IQueryable<T> source, FilterQuery query)
Parameters
System.Linq.IQueryable<T> source

The source create the QueryResult<T> for.

FilterQuery query

The FilterQuery object with filtering, sorting and paging information.

Returns
QueryResult<T>

A filtered, sorted and paged QueryResult<T>.

Type Parameters
T

The type of objects to enumerate.

AsQueryResult<T>(IQueryable<T>, Query)

Creates a sorted and paged QueryResult<T> from the source and Query.

Declaration
public static QueryResult<T> AsQueryResult<T>(this IQueryable<T> source, Query query)
Parameters
System.Linq.IQueryable<T> source

The source create the QueryResult<T> for.

Query query

The Query object with sorting and paging information.

Returns
QueryResult<T>

A sorted and paged QueryResult<T>.

Type Parameters
T

The type of objects to enumerate.

Filter<T>(IQueryable<T>, FilterQuery)

Creates a filtered result from the source.

Declaration
public static IQueryable<T> Filter<T>(this IQueryable<T> source, FilterQuery query)
Parameters
System.Linq.IQueryable<T> source

The source to sort.

FilterQuery query

The FilterQuery object with filtering information.

Returns
System.Linq.IQueryable<T>

A filtered result.

Type Parameters
T

The type of objects to enumerate.

Page<T>(IQueryable<T>, Query)

Creates a paged result from the source.

Declaration
public static IQueryable<T> Page<T>(this IQueryable<T> source, Query query)
Parameters
System.Linq.IQueryable<T> source

The source to page.

Query query

The Query object with paging information.

Returns
System.Linq.IQueryable<T>

A paged result.

Type Parameters
T

The type of objects to enumerate.

Page<T>(IQueryable<T>, Int32, Int32)

Creates a paged result from the source.

Declaration
public static IQueryable<T> Page<T>(this IQueryable<T> source, int pageIndex, int pageSize)
Parameters
System.Linq.IQueryable<T> source

The source to page.

System.Int32 pageIndex

Zero-based index of the page to return.

System.Int32 pageSize

The size of the page.

Returns
System.Linq.IQueryable<T>

A paged result.

Type Parameters
T

The type of objects to enumerate.

Sort<T>(IQueryable<T>, Query)

Creates a sorted result from the source.

Declaration
public static IQueryable<T> Sort<T>(this IQueryable<T> source, Query query)
Parameters
System.Linq.IQueryable<T> source

The source to sort.

Query query

The Query object with sorting information.

Returns
System.Linq.IQueryable<T>

A sorted result.

Type Parameters
T

The type of objects to enumerate.

Back to top Generated by DocFX