QueryableExtension Class

Class QueryableExtension.

Inheritance

Object

QueryableExtension

Namespace: Radzen

Assembly: Radzen.Blazor.dll

Syntax

public static class QueryableExtension

Methods

AsODataEnumerablelink

Ases the o data enumerable.

Declaration
public static ODataEnumerable<T> AsODataEnumerable(IEnumerable<T> source)
Parameters
Type Name Description
IEnumerable<T> source The source.
Returns
Type Description
ODataEnumerable<T>ODataEnumerable<T>.

Averagelink

Calculates the average of the elements of an IQueryable using the specified type.

Declaration
public static object Average(IQueryable source, Type type)
Parameters
Type Name Description
IQueryable source The IQueryable that contains the elements to be used for average calculation.
Type type The type to cast the elements of source to.
Returns
Type Description
objectThe result.

Castlink

Converts the elements of an IQueryable to the specified type.

Declaration
public static IQueryable Cast(IQueryable source, Type type)
Parameters
Type Name Description
IQueryable source The IQueryable that contains the elements to be converted.
Type type The type to convert the elements of source to.
Returns
Type Description
IQueryableAn IQueryable that contains each element of the source sequence converted to the specified type.

Distinctlink

Returns distinct elements from a sequence by using the default equality comparer to compare values.

Declaration
public static IQueryable Distinct(IQueryable source)
Parameters
Type Name Description
IQueryable source The sequence to remove duplicate elements from.
Returns
Type Description
IQueryableAn IQueryable that contains distinct elements from the source sequence.

FirstOrDefaultlink

Returns the first element of a sequence, or a default value if the sequence contains no elements.

Declaration
public static object FirstOrDefault(IQueryable source)
Parameters
Type Name Description
IQueryable source The IQueryable to return the first element of.
Returns
Type Description
objectdefault if source is empty; otherwise, the first element in source.

GroupByManylink

Projects each element of a sequence to an IEnumerable and flattens the resulting sequences into one sequence.

Declaration
public static IQueryable<GroupResult> GroupByMany(IQueryable<T> source, String[] properties)
Parameters
Type Name Description
IQueryable<T> source
String[] properties
Returns
Type Description
IQueryable<GroupResult>

IsEnumerablelink

Gets if type is IEnumerable.

Declaration
public static bool IsEnumerable(Type type)
Parameters
Type Name Description
Type type
Returns
Type Description
bool

LastOrDefaultlink

Returns the last element of a sequence, or a default value if the sequence contains no elements.

Declaration
public static object LastOrDefault(IQueryable source)
Parameters
Type Name Description
IQueryable source The IQueryable to return the last element of.
Returns
Type Description
objectdefault if source is empty; otherwise, the last element in source.

Maxlink

Gets the maximum value of elements of an IQueryable using the specified type.

Declaration
public static object Max(IQueryable source, Type type)
Parameters
Type Name Description
IQueryable source The IQueryable that contains the elements to be used to get the maximum value.
Type type The type to cast the elements of source to.
Returns
Type Description
objectThe result.

Minlink

Gets the minimum value of elements of an IQueryable using the specified type.

Declaration
public static object Min(IQueryable source, Type type)
Parameters
Type Name Description
IQueryable source The IQueryable that contains the elements to be used to get the minimum value.
Type type The type to cast the elements of source to.
Returns
Type Description
objectThe result.

OrderBylink

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

Declaration
public static IOrderedQueryable<T> OrderBy(IQueryable<T> source, string selector)
Parameters
Type Name Description
IQueryable<T> source
string selector
Returns
Type Description
IOrderedQueryable<T>A IQueryable<T> whose elements are sorted according to the specified selector.

OrderBylink

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

Declaration
public static IQueryable OrderBy(IQueryable source, string selector)
Parameters
Type Name Description
IQueryable source
string selector
Returns
Type Description
IQueryableA IQueryable<T> whose elements are sorted according to the specified selector.

Selectlink

Projects each element of a sequence into a collection of property values.

Declaration
public static IQueryable Select(IQueryable source, string propertyName)
Parameters
Type Name Description
IQueryable source
string propertyName
Returns
Type Description
IQueryable

Selectlink

Projects each element of a sequence into a collection of property values.

Declaration
public static IQueryable Select(IQueryable source, IEnumerable<string> propertyNames)
Parameters
Type Name Description
IQueryable source
IEnumerable<string> propertyNames
Returns
Type Description
IQueryable

Selectlink

Projects each element of a sequence into a collection of property values.

Declaration
public static IQueryable<T> Select(IQueryable<T> source, IEnumerable<string> propertyNames)
Parameters
Type Name Description
IQueryable<T> source
IEnumerable<string> propertyNames
Returns
Type Description
IQueryable<T>

SelectManylink

Projects each element of a sequence to an IEnumerable and flattens the resulting sequences into one sequence.

Declaration
public static IQueryable SelectMany(IQueryable source, string propertyName)
Parameters
Type Name Description
IQueryable source
string propertyName
Returns
Type Description
IQueryable

SelectManyRecursivelink

Selects the many recursive.

Declaration
public static IEnumerable<T> SelectManyRecursive(IEnumerable<T> source, Func<T, IEnumerable<T>> selector)
Parameters
Type Name Description
IEnumerable<T> source The source.
Func<T, IEnumerable<T>> selector The selector.
Returns
Type Description
IEnumerable<T>IEnumerable<T>.

Sumlink

Sums the elements of an IQueryable using the specified type.

Declaration
public static object Sum(IQueryable source, Type type)
Parameters
Type Name Description
IQueryable source The IQueryable that contains the elements to be summed.
Type type The type to cast the elements of source to.
Returns
Type Description
objectThe result.

ToFilterStringlink

Converts to filterstring.

Declaration
public static string ToFilterString(IEnumerable<RadzenDataGridColumn<T>> columns)
Parameters
Type Name Description
IEnumerable<RadzenDataGridColumn<T>> columns The columns.
Returns
Type Description
stringSystem.String.

ToFilterStringlink

Converts to filterstring.

Declaration
public static string ToFilterString(RadzenDataFilter<T> dataFilter)
Parameters
Type Name Description
RadzenDataFilter<T> dataFilter
Returns
Type Description
stringSystem.String.

ToFilterStringlink

Converts to filterstring.

Declaration
public static string ToFilterString(IEnumerable<CompositeFilterDescriptor> filters, LogicalFilterOperator logicalFilterOperator, FilterCaseSensitivity filterCaseSensitivity)
Parameters
Type Name Description
IEnumerable<CompositeFilterDescriptor> filters
LogicalFilterOperator logicalFilterOperator
FilterCaseSensitivity filterCaseSensitivity
Returns
Type Description
stringSystem.String.

ToListlink

Converts to list.

Declaration
public static Collections.IList ToList(IQueryable query)
Parameters
Type Name Description
IQueryable query The query.
Returns
Type Description
Collections.IListIList.

ToODataFilterStringlink

Converts to odatafilterstring.

Declaration
public static string ToODataFilterString(IEnumerable<RadzenDataGridColumn<T>> columns)
Parameters
Type Name Description
IEnumerable<RadzenDataGridColumn<T>> columns The columns.
Returns
Type Description
stringSystem.String.

ToODataFilterStringlink

Converts to odatafilterstring.

Declaration
public static string ToODataFilterString(RadzenDataFilter<T> dataFilter)
Parameters
Type Name Description
RadzenDataFilter<T> dataFilter
Returns
Type Description
stringSystem.String.

ToODataFilterStringlink

Converts to odatafilterstring.

Declaration
public static string ToODataFilterString(IEnumerable<CompositeFilterDescriptor> filters, LogicalFilterOperator logicalFilterOperator, FilterCaseSensitivity filterCaseSensitivity)
Parameters
Type Name Description
IEnumerable<CompositeFilterDescriptor> filters
LogicalFilterOperator logicalFilterOperator
FilterCaseSensitivity filterCaseSensitivity
Returns
Type Description
stringSystem.String.

Wherelink

Filters using the specified filter descriptors.

Declaration
public static IQueryable Where(IQueryable source, IEnumerable<FilterDescriptor> filters, LogicalFilterOperator logicalFilterOperator, FilterCaseSensitivity filterCaseSensitivity)
Parameters
Type Name Description
IQueryable source
IEnumerable<FilterDescriptor> filters
LogicalFilterOperator logicalFilterOperator
FilterCaseSensitivity filterCaseSensitivity
Returns
Type Description
IQueryable

Wherelink

Filters using the specified filter descriptors.

Declaration
public static IQueryable<T> Where(IQueryable<T> source, IEnumerable<FilterDescriptor> filters, LogicalFilterOperator logicalFilterOperator, FilterCaseSensitivity filterCaseSensitivity)
Parameters
Type Name Description
IQueryable<T> source
IEnumerable<FilterDescriptor> filters
LogicalFilterOperator logicalFilterOperator
FilterCaseSensitivity filterCaseSensitivity
Returns
Type Description
IQueryable<T>

Wherelink

Filters using the specified filter descriptors.

Declaration
public static IQueryable<T> Where(IQueryable<T> source, IEnumerable<RadzenDataGridColumn<T>> columns)
Parameters
Type Name Description
IQueryable<T> source
IEnumerable<RadzenDataGridColumn<T>> columns
Returns
Type Description
IQueryable<T>

Wherelink

Filters using the specified filter descriptors.

Declaration
public static IQueryable<T> Where(IQueryable<T> source, RadzenDataFilter<T> dataFilter)
Parameters
Type Name Description
IQueryable<T> source
RadzenDataFilter<T> dataFilter
Returns
Type Description
IQueryable<T>

Wherelink

Filters using the specified filter descriptors.

Declaration
public static IQueryable<T> Where(IQueryable<T> source, IEnumerable<CompositeFilterDescriptor> filters, LogicalFilterOperator logicalFilterOperator, FilterCaseSensitivity filterCaseSensitivity)
Parameters
Type Name Description
IQueryable<T> source
IEnumerable<CompositeFilterDescriptor> filters
LogicalFilterOperator logicalFilterOperator
FilterCaseSensitivity filterCaseSensitivity
Returns
Type Description
IQueryable<T>

Wherelink

Filters using the specified filter descriptors.

Declaration
public static IQueryable Where(IQueryable source, string property, string value, StringFilterOperator op, FilterCaseSensitivity cs)
Parameters
Type Name Description
IQueryable source
string property
string value
StringFilterOperator op
FilterCaseSensitivity cs
Returns
Type Description
IQueryable
In This Article
An error has occurred. This app may no longer respond until reloaded. Reload 🗙