C# Класс Telerik.Web.Mvc.Extensions.QueryableExtensions

Показать файл Открыть проект

Открытые методы

Метод Описание
Aggregate ( this source, IEnumerable aggregateFunctions ) : AggregateResultCollection

Calculates the results of given aggregates functions on a sequence of elements.

Count ( this source ) : int

Returns the number of elements in a sequence.

ElementAt ( this source, int index ) : object

Returns the element at a specified index in a sequence.

GroupBy ( this source, IEnumerable groupDescriptors ) : IQueryable

Groups the elements of a sequence according to a specified groupDescriptors.

GroupBy ( this source, LambdaExpression keySelector ) : IQueryable

Groups the elements of a sequence according to a specified key selector function.

OrderBy ( this source, LambdaExpression keySelector ) : IQueryable

Sorts the elements of a sequence in ascending order according to a key.

OrderBy ( this source, LambdaExpression keySelector, ListSortDirection sortDirection ) : IQueryable

Calls OrderBy(System.Linq.IQueryable,System.Linq.Expressions.LambdaExpression) or OrderByDescending depending on the sortDirection.

OrderByDescending ( this source, LambdaExpression keySelector ) : IQueryable

Sorts the elements of a sequence in descending order according to a key.

Page ( this source, int pageIndex, int pageSize ) : IQueryable

Pages through the elements of a sequence until the specified pageIndex using pageSize.

Select ( this source, LambdaExpression selector ) : IQueryable

Projects each element of a sequence into a new form.

Skip ( this source, int count ) : IQueryable

Bypasses a specified number of elements in a sequence and then returns the remaining elements.

Sort ( this source, IEnumerable sortDescriptors ) : IQueryable

Sorts the elements of a sequence using the specified sort descriptors.

Take ( this source, int count ) : IQueryable

Returns a specified number of contiguous elements from the start of a sequence.

ToGridModel ( this queryable, Telerik.Web.Mvc.GridState state ) : Telerik.Web.Mvc.GridModel
ToGridModel ( this queryable, int page, int pageSize, IList sortDescriptors, IEnumerable filterDescriptors, IEnumerable groupDescriptors ) : Telerik.Web.Mvc.GridModel
ToGridModel ( this queryable, int page, int pageSize, string orderBy, string groupBy, string filter ) : Telerik.Web.Mvc.GridModel
ToGroupingGridModel ( this queryable, IEnumerable groupDescriptors, int totalCount ) : Telerik.Web.Mvc.GridModel
ToIList ( this source ) : IList

Creates a IList{T} from an IQueryable where T is IQueryable.ElementType.

Where ( this source, Expression predicate ) : IQueryable

Filters a sequence of values based on a predicate.

Where ( this source, IEnumerable filterDescriptors ) : IQueryable

Filters a sequence of values based on a collection of IFilterDescriptor.

Приватные методы

Метод Описание
CallQueryableMethod ( this source, string methodName, LambdaExpression selector ) : IQueryable
IsBindableType ( Type type ) : bool
Ordered ( this source ) : IQueryable
SelectDistinct ( this source, Type propertyType, string propertyName ) : IQueryable

Описание методов

Aggregate() публичный статический Метод

Calculates the results of given aggregates functions on a sequence of elements.
public static Aggregate ( this source, IEnumerable aggregateFunctions ) : AggregateResultCollection
source this An whose elements will /// be used for aggregate calculation.
aggregateFunctions IEnumerable The aggregate functions.
Результат AggregateResultCollection

Count() публичный статический Метод

Returns the number of elements in a sequence.
is null.
public static Count ( this source ) : int
source this /// The that contains the elements to be counted. ///
Результат int

ElementAt() публичный статический Метод

Returns the element at a specified index in a sequence.
is null. is less than zero.
public static ElementAt ( this source, int index ) : object
source this An to return an element from.
index int The zero-based index of the element to retrieve.
Результат object

GroupBy() публичный статический Метод

Groups the elements of a sequence according to a specified groupDescriptors.
public static GroupBy ( this source, IEnumerable groupDescriptors ) : IQueryable
source this An whose elements to group.
groupDescriptors IEnumerable The group descriptors used for grouping.
Результат IQueryable

GroupBy() публичный статический Метод

Groups the elements of a sequence according to a specified key selector function.
public static GroupBy ( this source, LambdaExpression keySelector ) : IQueryable
source this An whose elements to group.
keySelector System.Linq.Expressions.LambdaExpression A function to extract the key for each element.
Результат IQueryable

OrderBy() публичный статический Метод

Sorts the elements of a sequence in ascending order according to a key.
public static OrderBy ( this source, LambdaExpression keySelector ) : IQueryable
source this /// A sequence of values to order. ///
keySelector System.Linq.Expressions.LambdaExpression /// A function to extract a key from an element. ///
Результат IQueryable

OrderBy() публичный статический Метод

Calls OrderBy(System.Linq.IQueryable,System.Linq.Expressions.LambdaExpression) or OrderByDescending depending on the sortDirection.
public static OrderBy ( this source, LambdaExpression keySelector, ListSortDirection sortDirection ) : IQueryable
source this The source.
keySelector System.Linq.Expressions.LambdaExpression The key selector.
sortDirection ListSortDirection The sort direction.
Результат IQueryable

OrderByDescending() публичный статический Метод

Sorts the elements of a sequence in descending order according to a key.
public static OrderByDescending ( this source, LambdaExpression keySelector ) : IQueryable
source this /// A sequence of values to order. ///
keySelector System.Linq.Expressions.LambdaExpression /// A function to extract a key from an element. ///
Результат IQueryable

Page() публичный статический Метод

Pages through the elements of a sequence until the specified pageIndex using pageSize.
public static Page ( this source, int pageIndex, int pageSize ) : IQueryable
source this A sequence of values to page.
pageIndex int Index of the page.
pageSize int Size of the page.
Результат IQueryable

Select() публичный статический Метод

Projects each element of a sequence into a new form.
public static Select ( this source, LambdaExpression selector ) : IQueryable
source this A sequence of values to project.
selector System.Linq.Expressions.LambdaExpression A projection function to apply to each element.
Результат IQueryable

Skip() публичный статический Метод

Bypasses a specified number of elements in a sequence and then returns the remaining elements.
is null.
public static Skip ( this source, int count ) : IQueryable
source this /// An to return elements from. ///
count int /// The number of elements to skip before returning the remaining elements. ///
Результат IQueryable

Sort() публичный статический Метод

Sorts the elements of a sequence using the specified sort descriptors.
public static Sort ( this source, IEnumerable sortDescriptors ) : IQueryable
source this A sequence of values to sort.
sortDescriptors IEnumerable The sort descriptors used for sorting.
Результат IQueryable

Take() публичный статический Метод

Returns a specified number of contiguous elements from the start of a sequence.
is null.
public static Take ( this source, int count ) : IQueryable
source this The sequence to return elements from.
count int The number of elements to return.
Результат IQueryable

ToGridModel() публичный статический Метод

public static ToGridModel ( this queryable, Telerik.Web.Mvc.GridState state ) : Telerik.Web.Mvc.GridModel
queryable this
state Telerik.Web.Mvc.GridState
Результат Telerik.Web.Mvc.GridModel

ToGridModel() публичный статический Метод

public static ToGridModel ( this queryable, int page, int pageSize, IList sortDescriptors, IEnumerable filterDescriptors, IEnumerable groupDescriptors ) : Telerik.Web.Mvc.GridModel
queryable this
page int
pageSize int
sortDescriptors IList
filterDescriptors IEnumerable
groupDescriptors IEnumerable
Результат Telerik.Web.Mvc.GridModel

ToGridModel() публичный статический Метод

public static ToGridModel ( this queryable, int page, int pageSize, string orderBy, string groupBy, string filter ) : Telerik.Web.Mvc.GridModel
queryable this
page int
pageSize int
orderBy string
groupBy string
filter string
Результат Telerik.Web.Mvc.GridModel

ToGroupingGridModel() публичный статический Метод

public static ToGroupingGridModel ( this queryable, IEnumerable groupDescriptors, int totalCount ) : Telerik.Web.Mvc.GridModel
queryable this
groupDescriptors IEnumerable
totalCount int
Результат Telerik.Web.Mvc.GridModel

ToIList() публичный статический Метод

Creates a IList{T} from an IQueryable where T is IQueryable.ElementType.
/// is null. ///
public static ToIList ( this source ) : IList
source this /// The to create a from. ///
Результат IList

Where() публичный статический Метод

Filters a sequence of values based on a predicate.
public static Where ( this source, Expression predicate ) : IQueryable
source this An to filter.
predicate System.Linq.Expressions.Expression A function to test each element for a condition.
Результат IQueryable

Where() публичный статический Метод

Filters a sequence of values based on a collection of IFilterDescriptor.
public static Where ( this source, IEnumerable filterDescriptors ) : IQueryable
source this The source.
filterDescriptors IEnumerable The filter descriptors.
Результат IQueryable