QueryableExtensions
Provides extension methods to process DataSourceRequest.
Definition
Namespace:Kendo.Mvc.Extensions
Assembly:Kendo.Mvc.dll
Syntax:
public static class QueryableExtensions
Inheritance: objectQueryableExtensions
Inherited Members
Methods
Calculates the results of given aggregates functions on a sequence of elements.
public static AggregateResultCollection Aggregate(this IQueryable source, IEnumerable<AggregateFunction> aggregateFunctions)
An IQueryable whose elements will be used for aggregate calculation.
aggregateFunctionsIEnumerable<AggregateFunction>The aggregate functions.
Returns:Collection of AggregateResults calculated for each function.
Returns the number of elements in a sequence.
public static int Count(this IQueryable source)
The IQueryable that contains the elements to be counted.
Returns:The number of elements in the input sequence.
Exceptions: ArgumentNullExceptionsource is null.
Returns the element at a specified index in a sequence.
public static object ElementAt(this IQueryable source, int index)
An IQueryable to return an element from.
indexintThe zero-based index of the element to retrieve.
Returns:The element at the specified position in source.
source is null.
index is less than zero.
Groups the elements of a sequence according to a specified groupDescriptors.
public static IQueryable GroupBy(this IQueryable source, IEnumerable<GroupDescriptor> groupDescriptors, bool includeItems)
An IQueryable whose elements to group.
groupDescriptorsIEnumerable<GroupDescriptor>The group descriptors used for grouping.
includeItemsboolWhether to include individual items in the groups.
Returns:An IQueryable with IGroup items, whose elements contains a sequence of objects and a key.
Groups the elements of a sequence according to a specified groupDescriptors and allows including or excluding the parents.
public static IQueryable GroupBy(this IQueryable source, IQueryable notPagedData, IEnumerable<GroupDescriptor> groupDescriptors, bool includeItems)
An IQueryable whose elements to group.
notPagedDataIQueryableThe not paged data.
groupDescriptorsIEnumerable<GroupDescriptor>The group descriptors used for grouping.
includeItemsboolThe condition for including the parents.
Returns:An IQueryable with IGroup items, whose elements contains a sequence of objects and a key.
Groups the elements of a sequence according to a specified key selector function.
public static IQueryable GroupBy(this IQueryable source, LambdaExpression keySelector)
An IQueryable whose elements to group.
keySelectorLambdaExpressionA function to extract the key for each element.
Returns:An IQueryable with IGrouping<TKey, TElement> items, whose elements contains a sequence of objects and a key.
Calls OrderBy(IQueryable, LambdaExpression)
or OrderByDescending(IQueryable, LambdaExpression) depending on the sortDirection.
public static IQueryable OrderBy(this IQueryable source, LambdaExpression keySelector, ListSortDirection? sortDirection)
The source.
keySelectorLambdaExpressionThe key selector.
sortDirectionListSortDirection?The sort direction.
Returns:An IQueryable whose elements are sorted according to a key.
Sorts the elements of a sequence in ascending order according to a key.
public static IQueryable OrderBy(this IQueryable source, LambdaExpression keySelector)
A sequence of values to order.
keySelectorLambdaExpressionA function to extract a key from an element.
Returns:An IQueryable whose elements are sorted according to a key.
Sorts the elements of a sequence in descending order according to a key.
public static IQueryable OrderByDescending(this IQueryable source, LambdaExpression keySelector)
A sequence of values to order.
keySelectorLambdaExpressionA function to extract a key from an element.
Returns:An IQueryable whose elements are sorted in descending order according to a key.
Pages through the elements of a sequence until the specified
pageIndex using pageSize.
public static IQueryable Page(this IQueryable source, int pageIndex, int pageSize)
A sequence of values to page.
pageIndexintIndex of the page.
pageSizeintSize of the page.
Returns:An IQueryable whose elements are at the specified pageIndex.
Projects each element of a sequence into a new form.
public static IQueryable Select(this IQueryable source, LambdaExpression selector)
A sequence of values to project.
selectorLambdaExpressionA projection function to apply to each element.
Returns:An IQueryable whose elements are the result of invoking a
projection selector on each element of source.
Bypasses a specified number of elements in a sequence and then returns the remaining elements.
public static IQueryable Skip(this IQueryable source, int count)
An IQueryable to return elements from.
countintThe number of elements to skip before returning the remaining elements.
Returns:An IQueryable that contains elements that occur after the specified index in the input sequence.
Exceptions: ArgumentNullExceptionsource is null.
Sorts the elements of a sequence using the specified sort descriptors.
public static IQueryable Sort(this IQueryable source, IEnumerable<SortDescriptor> sortDescriptors)
A sequence of values to sort.
sortDescriptorsIEnumerable<SortDescriptor>The sort descriptors used for sorting.
Returns:An IQueryable whose elements are sorted according to a sortDescriptors.
Returns a specified number of contiguous elements from the start of a sequence.
public static IQueryable Take(this IQueryable source, int count)
The sequence to return elements from.
countintThe number of elements to return.
Returns:An IQueryable that contains the specified number
of elements from the start of source.
source is null.
Applies paging, sorting, filtering and grouping using the information from the DataSourceRequest object. If the collection is already paged, the method returns an empty resullt.
public static DataSourceResult ToDataSourceResult(this DataTable dataTable, DataSourceRequest request)
An instance of DataTable.
requestDataSourceRequestAn instance of DataSourceRequest.
Returns:A DataSourceResult object, which contains the processed data after paging, sorting, filtering and grouping are applied.
Applies paging, sorting, filtering and grouping using the information from the DataSourceRequest object. If the collection is already paged, the method returns an empty result.
public static DataSourceResult ToDataSourceResult(this IEnumerable enumerable, DataSourceRequest request, ModelStateDictionary modelState)
An instance of IEnumerable.
requestDataSourceRequestAn instance of DataSourceRequest.
modelStateModelStateDictionaryAn instance of ModelStateDictionary.
Returns:A DataSourceResult object, which contains the processed data after paging, sorting, filtering and grouping are applied.
Applies paging, sorting, filtering and grouping using the information from the DataSourceRequest object. If the collection is already paged, the method returns an empty result.
public static DataSourceResult ToDataSourceResult(this IEnumerable enumerable, DataSourceRequest request)
An instance of IEnumerable.
requestDataSourceRequestAn instance of DataSourceRequest.
Returns:A DataSourceResult object, which contains the processed data after paging, sorting, filtering and grouping are applied.
Applies paging, sorting, filtering and grouping using the information from the DataSourceRequest object. If the collection is already paged, the method returns an empty result.
public static DataSourceResult ToDataSourceResult(this IQueryable queryable, DataSourceRequest request, ModelStateDictionary modelState)
An instance of IQueryable.
requestDataSourceRequestAn instance of DataSourceRequest.
modelStateModelStateDictionaryAn instance of ModelStateDictionary.
Returns:A DataSourceResult object, which contains the processed data after paging, sorting, filtering and grouping are applied.
Applies paging, sorting, filtering and grouping using the information from the DataSourceRequest object. If the collection is already paged, the method returns an empty result.
public static DataSourceResult ToDataSourceResult(this IQueryable queryable, DataSourceRequest request)
An instance of IQueryable.
requestDataSourceRequestAn instance of DataSourceRequest.
Returns:A DataSourceResult object, which contains the processed data after paging, sorting, filtering and grouping are applied.
Applies paging, sorting, filtering and grouping using the information from the DataSourceRequest object. If the collection is already paged, the method returns an empty result.
public static DataSourceResult ToDataSourceResult<TModel, TResult>(this IEnumerable<TModel> enumerable, DataSourceRequest request, Func<TModel, TResult> selector)
An instance of IEnumerable.
requestDataSourceRequestAn instance of DataSourceRequest.
selectorFunc<TModel, TResult>A projection function to apply to each element.
Returns:A DataSourceResult object, which contains the processed data after paging, sorting, filtering and grouping are applied.
Applies paging, sorting, filtering and grouping using the information from the DataSourceRequest object. If the collection is already paged, the method returns an empty result.
public static DataSourceResult ToDataSourceResult<TModel, TResult>(this IEnumerable<TModel> enumerable, DataSourceRequest request, ModelStateDictionary modelState, Func<TModel, TResult> selector)
An instance of IEnumerable.
requestDataSourceRequestAn instance of DataSourceRequest.
modelStateModelStateDictionaryAn instance of ModelStateDictionary.
selectorFunc<TModel, TResult>A projection function to apply to each element.
Returns:A DataSourceResult object, which contains the processed data after paging, sorting, filtering and grouping are applied.
Applies paging, sorting, filtering and grouping using the information from the DataSourceRequest object. If the collection is already paged, the method returns an empty result.
public static DataSourceResult ToDataSourceResult<TModel, TResult>(this IQueryable<TModel> enumerable, DataSourceRequest request, Func<TModel, TResult> selector)
An instance of IQueryable.
requestDataSourceRequestAn instance of DataSourceRequest.
selectorFunc<TModel, TResult>A projection function to apply to each element.
Returns:A DataSourceResult object, which contains the processed data after paging, sorting, filtering and grouping are applied.
Applies paging, sorting, filtering and grouping using the information from the DataSourceRequest object. If the collection is already paged, the method returns an empty result.
public static DataSourceResult ToDataSourceResult<TModel, TResult>(this IQueryable<TModel> enumerable, DataSourceRequest request, ModelStateDictionary modelState, Func<TModel, TResult> selector)
An instance of IQueryable.
requestDataSourceRequestAn instance of DataSourceRequest.
modelStateModelStateDictionaryAn instance of ModelStateDictionary.
selectorFunc<TModel, TResult>A projection function to apply to each element.
Returns:A DataSourceResult object, which contains the processed data after paging, sorting, filtering and grouping are applied.
Applies paging, sorting, filtering and grouping using the information from the DataSourceRequest object. If the collection is already paged, the method returns an empty resullt.
public static Task<DataSourceResult> ToDataSourceResultAsync(this DataTable dataTable, DataSourceRequest request, CancellationToken cancellationToken)
An instance of DataTable.
requestDataSourceRequestAn instance of DataSourceRequest.
cancellationTokenCancellationTokenAn instance of CancellationToken.
Returns:A Task of DataSourceResult object, which contains the processed data after paging, sorting, filtering and grouping are applied. It can be called with the "await" keyword for asynchronous operation.
Applies paging, sorting, filtering and grouping using the information from the DataSourceRequest object. If the collection is already paged, the method returns an empty resullt.
public static Task<DataSourceResult> ToDataSourceResultAsync(this DataTable dataTable, DataSourceRequest request)
An instance of DataTable.
requestDataSourceRequestAn instance of DataSourceRequest.
Returns:A Task of DataSourceResult object, which contains the processed data after paging, sorting, filtering and grouping are applied. It can be called with the "await" keyword for asynchronous operation.
Applies paging, sorting, filtering and grouping using the information from the DataSourceRequest object. If the collection is already paged, the method returns an empty result.
public static Task<DataSourceResult> ToDataSourceResultAsync(this IEnumerable enumerable, DataSourceRequest request, CancellationToken cancellation)
An instance of IEnumerable.
requestDataSourceRequestAn instance of DataSourceRequest.
cancellationCancellationTokenAn instance of CancellationToken.
Returns:A Task of DataSourceResult object, which contains the processed data after paging, sorting, filtering and grouping are applied. It can be called with the "await" keyword for asynchronous operation.
Applies paging, sorting, filtering and grouping using the information from the DataSourceRequest object. If the collection is already paged, the method returns an empty result.
public static Task<DataSourceResult> ToDataSourceResultAsync(this IEnumerable enumerable, DataSourceRequest request, ModelStateDictionary modelState, CancellationToken cancellation)
An instance of IEnumerable.
requestDataSourceRequestAn instance of DataSourceRequest.
modelStateModelStateDictionaryAn instance of ModelStateDictionary.
cancellationCancellationTokenAn instance of CancellationToken.
Returns:A Task of DataSourceResult object, which contains the processed data after paging, sorting, filtering and grouping are applied. It can be called with the "await" keyword for asynchronous operation.
Applies paging, sorting, filtering and grouping using the information from the DataSourceRequest object. If the collection is already paged, the method returns an empty result.
public static Task<DataSourceResult> ToDataSourceResultAsync(this IEnumerable enumerable, DataSourceRequest request, ModelStateDictionary modelState)
An instance of IEnumerable.
requestDataSourceRequestAn instance of DataSourceRequest.
modelStateModelStateDictionaryAn instance of ModelStateDictionary.
Returns:A Task of DataSourceResult object, which contains the processed data after paging, sorting, filtering and grouping are applied. It can be called with the "await" keyword for asynchronous operation.
Applies paging, sorting, filtering and grouping using the information from the DataSourceRequest object. If the collection is already paged, the method returns an empty result.
public static Task<DataSourceResult> ToDataSourceResultAsync(this IEnumerable enumerable, DataSourceRequest request)
An instance of IEnumerable.
requestDataSourceRequestAn instance of DataSourceRequest.
Returns:A Task of DataSourceResult object, which contains the processed data after paging, sorting, filtering and grouping are applied. It can be called with the "await" keyword for asynchronous operation.
Applies paging, sorting, filtering and grouping using the information from the DataSourceRequest object. If the collection is already paged, the method returns an empty result.
public static Task<DataSourceResult> ToDataSourceResultAsync(this IQueryable queryable, DataSourceRequest request, CancellationToken cancellationToken)
An instance of IQueryable.
requestDataSourceRequestAn instance of DataSourceRequest.
cancellationTokenCancellationTokenAn instance of CancellationToken.
Returns:A Task of DataSourceResult object, which contains the processed data after paging, sorting, filtering and grouping are applied. It can be called with the "await" keyword for asynchronous operation.
Applies paging, sorting, filtering and grouping using the information from the DataSourceRequest object. If the collection is already paged, the method returns an empty result.
public static Task<DataSourceResult> ToDataSourceResultAsync(this IQueryable queryable, DataSourceRequest request, ModelStateDictionary modelState, CancellationToken cancellationToken)
An instance of IQueryable.
requestDataSourceRequestAn instance of DataSourceRequest.
modelStateModelStateDictionaryAn instance of ModelStateDictionary.
cancellationTokenCancellationTokenAn instance of CancellationToken.
Returns:A Task of DataSourceResult object, which contains the processed data after paging, sorting, filtering and grouping are applied. It can be called with the "await" keyword for asynchronous operation.
Applies paging, sorting, filtering and grouping using the information from the DataSourceRequest object. If the collection is already paged, the method returns an empty result.
public static Task<DataSourceResult> ToDataSourceResultAsync(this IQueryable queryable, DataSourceRequest request, ModelStateDictionary modelState)
An instance of IQueryable.
requestDataSourceRequestAn instance of DataSourceRequest.
modelStateModelStateDictionaryAn instance of ModelStateDictionary.
Returns:A Task of DataSourceResult object, which contains the processed data after paging, sorting, filtering and grouping are applied. It can be called with the "await" keyword for asynchronous operation.
Applies paging, sorting, filtering and grouping using the information from the DataSourceRequest object. If the collection is already paged, the method returns an empty result.
public static Task<DataSourceResult> ToDataSourceResultAsync(this IQueryable queryable, DataSourceRequest request)
An instance of IQueryable.
requestDataSourceRequestAn instance of DataSourceRequest.
Returns:A Task of DataSourceResult object, which contains the processed data after paging, sorting, filtering and grouping are applied. It can be called with the "await" keyword for asynchronous operation.
Applies paging, sorting, filtering and grouping using the information from the DataSourceRequest object. If the collection is already paged, the method returns an empty result.
public static Task<DataSourceResult> ToDataSourceResultAsync<TModel, TResult>(this IEnumerable<TModel> enumerable, DataSourceRequest request, Func<TModel, TResult> selector, CancellationToken cancellationToken)
An instance of IEnumerable.
requestDataSourceRequestAn instance of DataSourceRequest.
selectorFunc<TModel, TResult>A projection function to apply to each element.
cancellationTokenCancellationTokenAn instance of CancellationToken.
Returns:A Task of DataSourceResult object, which contains the processed data after paging, sorting, filtering and grouping are applied. It can be called with the "await" keyword for asynchronous operation.
Applies paging, sorting, filtering and grouping using the information from the DataSourceRequest object. If the collection is already paged, the method returns an empty result.
public static Task<DataSourceResult> ToDataSourceResultAsync<TModel, TResult>(this IEnumerable<TModel> enumerable, DataSourceRequest request, Func<TModel, TResult> selector)
An instance of IEnumerable.
requestDataSourceRequestAn instance of DataSourceRequest.
selectorFunc<TModel, TResult>A projection function to apply to each element.
Returns:A Task of DataSourceResult object, which contains the processed data after paging, sorting, filtering and grouping are applied. It can be called with the "await" keyword for asynchronous operation.
Applies paging, sorting, filtering and grouping using the information from the DataSourceRequest object. If the collection is already paged, the method returns an empty result.
public static Task<DataSourceResult> ToDataSourceResultAsync<TModel, TResult>(this IEnumerable<TModel> enumerable, DataSourceRequest request, ModelStateDictionary modelState, Func<TModel, TResult> selector, CancellationToken cancellationToken)
An instance of IEnumerable.
requestDataSourceRequestAn instance of DataSourceRequest.
modelStateModelStateDictionaryAn instance of ModelStateDictionary.
selectorFunc<TModel, TResult>A projection function to apply to each element.
cancellationTokenCancellationTokenAn instance of CancellationToken.
Returns:A Task of DataSourceResult object, which contains the processed data after paging, sorting, filtering and grouping are applied. It can be called with the "await" keyword for asynchronous operation.
Applies paging, sorting, filtering and grouping using the information from the DataSourceRequest object. If the collection is already paged, the method returns an empty result.
public static Task<DataSourceResult> ToDataSourceResultAsync<TModel, TResult>(this IEnumerable<TModel> enumerable, DataSourceRequest request, ModelStateDictionary modelState, Func<TModel, TResult> selector)
An instance of IEnumerable.
requestDataSourceRequestAn instance of DataSourceRequest.
modelStateModelStateDictionaryAn instance of ModelStateDictionary.
selectorFunc<TModel, TResult>A projection function to apply to each element.
Returns:A Task of DataSourceResult object, which contains the processed data after paging, sorting, filtering and grouping are applied. It can be called with the "await" keyword for asynchronous operation.
Applies paging, sorting, filtering and grouping using the information from the DataSourceRequest object. If the collection is already paged, the method returns an empty result.
public static Task<DataSourceResult> ToDataSourceResultAsync<TModel, TResult>(this IQueryable<TModel> queryable, DataSourceRequest request, Func<TModel, TResult> selector, CancellationToken cancellationToken)
A Task of DataSourceResult object, which contains the processed data after paging, sorting, filtering and grouping are applied. It can be called with the "await" keyword for asynchronous operation.
Applies paging, sorting, filtering and grouping using the information from the DataSourceRequest object. If the collection is already paged, the method returns an empty result.
public static Task<DataSourceResult> ToDataSourceResultAsync<TModel, TResult>(this IQueryable<TModel> queryable, DataSourceRequest request, Func<TModel, TResult> selector)
A Task of DataSourceResult object, which contains the processed data after paging, sorting, filtering and grouping are applied. It can be called with the "await" keyword for asynchronous operation.
Applies paging, sorting, filtering and grouping using the information from the DataSourceRequest object. If the collection is already paged, the method returns an empty result.
public static Task<DataSourceResult> ToDataSourceResultAsync<TModel, TResult>(this IQueryable<TModel> queryable, DataSourceRequest request, ModelStateDictionary modelState, Func<TModel, TResult> selector, CancellationToken cancellationToken)
An instance of IQueryable.
requestDataSourceRequestAn instance of DataSourceRequest.
modelStateModelStateDictionaryAn instance of ModelStateDictionary.
selectorFunc<TModel, TResult>A projection function to apply to each element.
cancellationTokenCancellationTokenAn instance of CancellationToken.
Returns:A Task of DataSourceResult object, which contains the processed data after paging, sorting, filtering and grouping are applied. It can be called with the "await" keyword for asynchronous operation.
Applies paging, sorting, filtering and grouping using the information from the DataSourceRequest object. If the collection is already paged, the method returns an empty result.
public static Task<DataSourceResult> ToDataSourceResultAsync<TModel, TResult>(this IQueryable<TModel> queryable, DataSourceRequest request, ModelStateDictionary modelState, Func<TModel, TResult> selector)
An instance of IQueryable.
requestDataSourceRequestAn instance of DataSourceRequest.
modelStateModelStateDictionaryAn instance of ModelStateDictionary.
selectorFunc<TModel, TResult>A projection function to apply to each element.
Returns:A Task of DataSourceResult object, which contains the processed data after paging, sorting, filtering and grouping are applied. It can be called with the "await" keyword for asynchronous operation.
Applies sorting, filtering and grouping using the information from the DataSourceRequest object. If the collection is already paged, the method returns an empty result.
public static TreeDataSourceResult ToTreeDataSourceResult(this IEnumerable enumerable, DataSourceRequest request, ModelStateDictionary modelState)
An instance of IEnumerable.
requestDataSourceRequestAn instance of DataSourceRequest.
modelStateModelStateDictionaryAn instance of ModelStateDictionary.
Returns:A TreeDataSourceResult object, which contains the processed data after sorting, filtering and grouping are applied.
Applies sorting, filtering and grouping using the information from the DataSourceRequest object. If the collection is already paged, the method returns an empty result.
public static TreeDataSourceResult ToTreeDataSourceResult(this IEnumerable enumerable, DataSourceRequest request)
An instance of IEnumerable.
requestDataSourceRequestAn instance of DataSourceRequest.
Returns:A TreeDataSourceResult object, which contains the processed data after sorting, filtering and grouping are applied.
Applies sorting, filtering and grouping using the information from the DataSourceRequest object. If the collection is already paged, the method returns an empty result.
public static TreeDataSourceResult ToTreeDataSourceResult<TModel, T1, T2, TResult>(this IEnumerable<TModel> queryable, DataSourceRequest request, Expression<Func<TModel, T1>> idSelector, Expression<Func<TModel, T2>> parentIDSelector, Expression<Func<TModel, bool>> rootSelector, Func<TModel, TResult> selector)
An instance of IEnumerable.
requestDataSourceRequestAn instance of DataSourceRequest.
idSelectorExpression<Func<TModel, T1>>The lambda which configures the selector of the ID field.
parentIDSelectorExpression<Func<TModel, T2>>The lambda which configures the parent selector.
rootSelectorExpression<Func<TModel, bool>>The lambda which configures the root selector.
selectorFunc<TModel, TResult>A projection function to apply to each element.
Returns:A TreeDataSourceResult object, which contains the processed data after sorting, filtering and grouping are applied.
Applies sorting, filtering and grouping using the information from the DataSourceRequest object. If the collection is already paged, the method returns an empty result.
public static TreeDataSourceResult ToTreeDataSourceResult<TModel, T1, T2, TResult>(this IEnumerable<TModel> queryable, DataSourceRequest request, Expression<Func<TModel, T1>> idSelector, Expression<Func<TModel, T2>> parentIDSelector, Expression<Func<TModel, bool>> rootSelector, ModelStateDictionary modelState, Func<TModel, TResult> selector)
An instance of IEnumerable.
requestDataSourceRequestAn instance of DataSourceRequest.
idSelectorExpression<Func<TModel, T1>>The lambda which configures the selector of the ID field.
parentIDSelectorExpression<Func<TModel, T2>>The lambda which configures the parent selector.
rootSelectorExpression<Func<TModel, bool>>The lambda which configures the root selector.
modelStateModelStateDictionaryAn instance of ModelStateDictionary.
selectorFunc<TModel, TResult>A projection function to apply to each element.
Returns:A TreeDataSourceResult object, which contains the processed data after sorting, filtering and grouping are applied.
Applies sorting, filtering and grouping using the information from the DataSourceRequest object. If the collection is already paged, the method returns an empty result.
public static TreeDataSourceResult ToTreeDataSourceResult<TModel, T1, T2, TResult>(this IEnumerable<TModel> queryable, DataSourceRequest request, Expression<Func<TModel, T1>> idSelector, Expression<Func<TModel, T2>> parentIDSelector, Func<TModel, TResult> selector)
An instance of IEnumerable.
requestDataSourceRequestAn instance of DataSourceRequest.
idSelectorExpression<Func<TModel, T1>>The lambda which configures the selector of the ID field.
parentIDSelectorExpression<Func<TModel, T2>>The lambda which configures the parent selector.
selectorFunc<TModel, TResult>A projection function to apply to each element.
Returns:A TreeDataSourceResult object, which contains the processed data after sorting, filtering and grouping are applied.
Applies sorting, filtering and grouping using the information from the DataSourceRequest object. If the collection is already paged, the method returns an empty result.
public static TreeDataSourceResult ToTreeDataSourceResult<TModel, T1, T2, TResult>(this IEnumerable<TModel> queryable, DataSourceRequest request, Expression<Func<TModel, T1>> idSelector, Expression<Func<TModel, T2>> parentIDSelector, ModelStateDictionary modelState, Func<TModel, TResult> selector)
An instance of IEnumerable.
requestDataSourceRequestAn instance of DataSourceRequest.
idSelectorExpression<Func<TModel, T1>>The lambda which configures the selector of the ID field.
parentIDSelectorExpression<Func<TModel, T2>>The lambda which configures the parent selector.
modelStateModelStateDictionaryAn instance of ModelStateDictionary.
selectorFunc<TModel, TResult>A projection function to apply to each element.
Returns:A TreeDataSourceResult object, which contains the processed data after sorting, filtering and grouping are applied.
Applies sorting, filtering and grouping using the information from the DataSourceRequest object. If the collection is already paged, the method returns an empty result.
public static TreeDataSourceResult ToTreeDataSourceResult<TModel, T1, T2, TResult>(this IQueryable<TModel> queryable, DataSourceRequest request, Expression<Func<TModel, T1>> idSelector, Expression<Func<TModel, T2>> parentIDSelector, Expression<Func<TModel, bool>> rootSelector, Func<TModel, TResult> selector)
An instance of IQueryable.
requestDataSourceRequestAn instance of DataSourceRequest.
idSelectorExpression<Func<TModel, T1>>The lambda which configures the selector of the ID field.
parentIDSelectorExpression<Func<TModel, T2>>The lambda which configures the parent selector.
rootSelectorExpression<Func<TModel, bool>>The lambda which configures the root selector.
selectorFunc<TModel, TResult>A projection function to apply to each element.
Returns:A TreeDataSourceResult object, which contains the processed data after sorting, filtering and grouping are applied.
Applies sorting, filtering and grouping using the information from the DataSourceRequest object. If the collection is already paged, the method returns an empty result.
public static TreeDataSourceResult ToTreeDataSourceResult<TModel, T1, T2, TResult>(this IQueryable<TModel> queryable, DataSourceRequest request, Expression<Func<TModel, T1>> idSelector, Expression<Func<TModel, T2>> parentIDSelector, Expression<Func<TModel, bool>> rootSelector, ModelStateDictionary modelState, Func<TModel, TResult> selector)
An instance of IQueryable.
requestDataSourceRequestAn instance of DataSourceRequest.
idSelectorExpression<Func<TModel, T1>>The lambda which configures the selector of the ID field.
parentIDSelectorExpression<Func<TModel, T2>>The lambda which configures the parent selector.
rootSelectorExpression<Func<TModel, bool>>The lambda which configures the root selector.
modelStateModelStateDictionaryAn instance of ModelStateDictionary.
selectorFunc<TModel, TResult>A projection function to apply to each element.
Returns:A TreeDataSourceResult object, which contains the processed data after sorting, filtering and grouping are applied.
Applies sorting, filtering and grouping using the information from the DataSourceRequest object. If the collection is already paged, the method returns an empty result.
public static TreeDataSourceResult ToTreeDataSourceResult<TModel, T1, T2, TResult>(this IQueryable<TModel> queryable, DataSourceRequest request, Expression<Func<TModel, T1>> idSelector, Expression<Func<TModel, T2>> parentIDSelector, Func<TModel, TResult> selector)
An instance of IQueryable.
requestDataSourceRequestAn instance of DataSourceRequest.
idSelectorExpression<Func<TModel, T1>>The lambda which configures the selector of the ID field.
parentIDSelectorExpression<Func<TModel, T2>>The lambda which configures the parent selector.
selectorFunc<TModel, TResult>A projection function to apply to each element.
Returns:A TreeDataSourceResult object, which contains the processed data after sorting, filtering and grouping are applied.
Applies sorting, filtering and grouping using the information from the DataSourceRequest object. If the collection is already paged, the method returns an empty result.
public static TreeDataSourceResult ToTreeDataSourceResult<TModel, T1, T2, TResult>(this IQueryable<TModel> queryable, DataSourceRequest request, Expression<Func<TModel, T1>> idSelector, Expression<Func<TModel, T2>> parentIDSelector, ModelStateDictionary modelState, Func<TModel, TResult> selector)
An instance of IQueryable.
requestDataSourceRequestAn instance of DataSourceRequest.
idSelectorExpression<Func<TModel, T1>>The lambda which configures the selector of the ID field.
parentIDSelectorExpression<Func<TModel, T2>>The lambda which configures the parent selector.
modelStateModelStateDictionaryAn instance of ModelStateDictionary.
selectorFunc<TModel, TResult>A projection function to apply to each element.
Returns:A TreeDataSourceResult object, which contains the processed data after sorting, filtering and grouping are applied.
Applies sorting, filtering and grouping using the information from the DataSourceRequest object. If the collection is already paged, the method returns an empty result.
public static TreeDataSourceResult ToTreeDataSourceResult<TModel, T1, T2>(this IEnumerable<TModel> enumerable, DataSourceRequest request, Expression<Func<TModel, T1>> idSelector, Expression<Func<TModel, T2>> parentIDSelector, Expression<Func<TModel, bool>> rootSelector, ModelStateDictionary modelState)
An instance of IEnumerable.
requestDataSourceRequestAn instance of DataSourceRequest.
idSelectorExpression<Func<TModel, T1>>The lambda which configures the selector of the ID field.
parentIDSelectorExpression<Func<TModel, T2>>The lambda which configures the parent selector.
rootSelectorExpression<Func<TModel, bool>>The lambda which configures the root selector.
modelStateModelStateDictionaryAn instance of ModelStateDictionary.
Returns:A TreeDataSourceResult object, which contains the processed data after sorting, filtering and grouping are applied.
Applies sorting, filtering and grouping using the information from the DataSourceRequest object. If the collection is already paged, the method returns an empty result.
public static TreeDataSourceResult ToTreeDataSourceResult<TModel, T1, T2>(this IEnumerable<TModel> enumerable, DataSourceRequest request, Expression<Func<TModel, T1>> idSelector, Expression<Func<TModel, T2>> parentIDSelector, Expression<Func<TModel, bool>> rootSelector)
An instance of IEnumerable.
requestDataSourceRequestAn instance of DataSourceRequest.
idSelectorExpression<Func<TModel, T1>>The lambda which configures the selector of the ID field.
parentIDSelectorExpression<Func<TModel, T2>>The lambda which configures the parent selector.
rootSelectorExpression<Func<TModel, bool>>The lambda which configures the root selector.
Returns:A TreeDataSourceResult object, which contains the processed data after sorting, filtering and grouping are applied.
Applies sorting, filtering and grouping using the information from the DataSourceRequest object. If the collection is already paged, the method returns an empty result.
public static TreeDataSourceResult ToTreeDataSourceResult<TModel, T1, T2>(this IEnumerable<TModel> queryable, DataSourceRequest request, Expression<Func<TModel, T1>> idSelector, Expression<Func<TModel, T2>> parentIDSelector, ModelStateDictionary modelState)
An instance of IEnumerable.
requestDataSourceRequestAn instance of DataSourceRequest.
idSelectorExpression<Func<TModel, T1>>The lambda which configures the selector of the ID field.
parentIDSelectorExpression<Func<TModel, T2>>The lambda which configures the parent selector.
modelStateModelStateDictionaryAn instance of ModelStateDictionary.
Returns:A TreeDataSourceResult object, which contains the processed data after sorting, filtering and grouping are applied.
Applies sorting, filtering and grouping using the information from the DataSourceRequest object. If the collection is already paged, the method returns an empty result.
public static TreeDataSourceResult ToTreeDataSourceResult<TModel, T1, T2>(this IEnumerable<TModel> enumerable, DataSourceRequest request, Expression<Func<TModel, T1>> idSelector, Expression<Func<TModel, T2>> parentIDSelector)
An instance of IEnumerable.
requestDataSourceRequestAn instance of DataSourceRequest.
idSelectorExpression<Func<TModel, T1>>The lambda which configures the selector of the ID field.
parentIDSelectorExpression<Func<TModel, T2>>The lambda which configures the parent selector.
Returns:A TreeDataSourceResult object, which contains the processed data after sorting, filtering and grouping are applied.
Applies sorting, filtering and grouping using the information from the DataSourceRequest object. If the collection is already paged, the method returns an empty result.
public static TreeDataSourceResult ToTreeDataSourceResult<TModel, T1, T2>(this IQueryable<TModel> enumerable, DataSourceRequest request, Expression<Func<TModel, T1>> idSelector, Expression<Func<TModel, T2>> parentIDSelector, Expression<Func<TModel, bool>> rootSelector, ModelStateDictionary modelState)
An instance of IQueryable.
requestDataSourceRequestAn instance of DataSourceRequest.
idSelectorExpression<Func<TModel, T1>>The lambda which configures the selector of the ID field.
parentIDSelectorExpression<Func<TModel, T2>>The lambda which configures the parent selector.
rootSelectorExpression<Func<TModel, bool>>The lambda which configures the root selector.
modelStateModelStateDictionaryAn instance of ModelStateDictionary.
Returns:A TreeDataSourceResult object, which contains the processed data after sorting, filtering and grouping are applied.
Applies sorting, filtering and grouping using the information from the DataSourceRequest object. If the collection is already paged, the method returns an empty result.
public static TreeDataSourceResult ToTreeDataSourceResult<TModel, T1, T2>(this IQueryable<TModel> enumerable, DataSourceRequest request, Expression<Func<TModel, T1>> idSelector, Expression<Func<TModel, T2>> parentIDSelector, Expression<Func<TModel, bool>> rootSelector)
An instance of IQueryable.
requestDataSourceRequestAn instance of DataSourceRequest.
idSelectorExpression<Func<TModel, T1>>The lambda which configures the selector of the ID field.
parentIDSelectorExpression<Func<TModel, T2>>The lambda which configures the parent selector.
rootSelectorExpression<Func<TModel, bool>>The lambda which configures the root selector.
Returns:A TreeDataSourceResult object, which contains the processed data after sorting, filtering and grouping are applied.
Applies sorting, filtering and grouping using the information from the DataSourceRequest object. If the collection is already paged, the method returns an empty result.
public static TreeDataSourceResult ToTreeDataSourceResult<TModel, T1, T2>(this IQueryable<TModel> queryable, DataSourceRequest request, Expression<Func<TModel, T1>> idSelector, Expression<Func<TModel, T2>> parentIDSelector, ModelStateDictionary modelState)
An instance of IQueryable.
requestDataSourceRequestAn instance of DataSourceRequest.
idSelectorExpression<Func<TModel, T1>>The lambda which configures the selector of the ID field.
parentIDSelectorExpression<Func<TModel, T2>>The lambda which configures the parent selector.
modelStateModelStateDictionaryAn instance of ModelStateDictionary.
Returns:A TreeDataSourceResult object, which contains the processed data after sorting, filtering and grouping are applied.
Applies sorting, filtering and grouping using the information from the DataSourceRequest object. If the collection is already paged, the method returns an empty result.
public static TreeDataSourceResult ToTreeDataSourceResult<TModel, T1, T2>(this IQueryable<TModel> enumerable, DataSourceRequest request, Expression<Func<TModel, T1>> idSelector, Expression<Func<TModel, T2>> parentIDSelector)
An instance of IQueryable.
requestDataSourceRequestAn instance of DataSourceRequest.
idSelectorExpression<Func<TModel, T1>>The lambda which configures the selector of the ID field.
parentIDSelectorExpression<Func<TModel, T2>>The lambda which configures the parent selector.
Returns:A TreeDataSourceResult object, which contains the processed data after sorting, filtering and grouping are applied.
Applies sorting, filtering and grouping using the information from the DataSourceRequest object. If the collection is already paged, the method returns an empty result.
public static TreeDataSourceResult ToTreeDataSourceResult<TModel, TResult>(this IEnumerable<TModel> enumerable, DataSourceRequest request, Func<TModel, TResult> selector)
An instance of IEnumerable.
requestDataSourceRequestAn instance of DataSourceRequest.
selectorFunc<TModel, TResult>A projection function to apply to each element.
Returns:A TreeDataSourceResult object, which contains the processed data after sorting, filtering and grouping are applied.
Applies sorting, filtering and grouping using the information from the DataSourceRequest object. If the collection is already paged, the method returns an empty result.
public static TreeDataSourceResult ToTreeDataSourceResult<TModel, TResult>(this IQueryable<TModel> enumerable, DataSourceRequest request, Func<TModel, TResult> selector)
An instance of IQueryable.
requestDataSourceRequestAn instance of DataSourceRequest.
selectorFunc<TModel, TResult>A projection function to apply to each element.
Returns:A TreeDataSourceResult object, which contains the processed data after sorting, filtering and grouping are applied.
Applies sorting, filtering and grouping using the information from the DataSourceRequest object. If the collection is already paged, the method returns an empty result.
public static Task<TreeDataSourceResult> ToTreeDataSourceResultAsync(this IEnumerable enumerable, DataSourceRequest request, CancellationToken cancellationToken)
An instance of IEnumerable.
requestDataSourceRequestAn instance of DataSourceRequest.
cancellationTokenCancellationTokenAn instance of CancellationToken.
Returns:A Task of TreeDataSourceResult object, which contains the processed data after sorting, filtering and grouping are applied. It can be called with the "await" keyword for asynchronous operation.
ToTreeDataSourceResultAsync(IEnumerable, DataSourceRequest, ModelStateDictionary, CancellationToken)
Applies sorting, filtering and grouping using the information from the DataSourceRequest object. If the collection is already paged, the method returns an empty result.
public static Task<TreeDataSourceResult> ToTreeDataSourceResultAsync(this IEnumerable enumerable, DataSourceRequest request, ModelStateDictionary modelState, CancellationToken cancellationToken)
An instance of IEnumerable.
requestDataSourceRequestAn instance of DataSourceRequest.
modelStateModelStateDictionaryAn instance of ModelStateDictionary.
cancellationTokenCancellationTokenAn instance of CancellationToken.
Returns:A Task of TreeDataSourceResult object, which contains the processed data after sorting, filtering and grouping are applied. It can be called with the "await" keyword for asynchronous operation.
Applies sorting, filtering and grouping using the information from the DataSourceRequest object. If the collection is already paged, the method returns an empty result.
public static Task<TreeDataSourceResult> ToTreeDataSourceResultAsync(this IEnumerable enumerable, DataSourceRequest request, ModelStateDictionary modelState)
An instance of IEnumerable.
requestDataSourceRequestAn instance of DataSourceRequest.
modelStateModelStateDictionaryAn instance of ModelStateDictionary.
Returns:A Task of TreeDataSourceResult object, which contains the processed data after sorting, filtering and grouping are applied. It can be called with the "await" keyword for asynchronous operation.
Applies sorting, filtering and grouping using the information from the DataSourceRequest object. If the collection is already paged, the method returns an empty result.
public static Task<TreeDataSourceResult> ToTreeDataSourceResultAsync(this IEnumerable enumerable, DataSourceRequest request)
An instance of IEnumerable.
requestDataSourceRequestAn instance of DataSourceRequest.
Returns:A Task of TreeDataSourceResult object, which contains the processed data after sorting, filtering and grouping are applied. It can be called with the "await" keyword for asynchronous operation.
Applies sorting, filtering and grouping using the information from the DataSourceRequest object. If the collection is already paged, the method returns an empty result.
public static Task<TreeDataSourceResult> ToTreeDataSourceResultAsync<TModel, T1, T2, TResult>(this IEnumerable<TModel> enumerable, DataSourceRequest request, Expression<Func<TModel, T1>> idSelector, Expression<Func<TModel, T2>> parentIDSelector, Expression<Func<TModel, bool>> rootSelector, Func<TModel, TResult> selector, CancellationToken cancellationToken)
An instance of IEnumerable.
requestDataSourceRequestAn instance of DataSourceRequest.
idSelectorExpression<Func<TModel, T1>>The lambda which configures the selector of the ID field.
parentIDSelectorExpression<Func<TModel, T2>>The lambda which configures the parent selector.
rootSelectorExpression<Func<TModel, bool>>The lambda which configures the root selector.
selectorFunc<TModel, TResult>A projection function to apply to each element.
cancellationTokenCancellationTokenAn instance of CancellationToken.
Returns:A Task of TreeDataSourceResult object, which contains the processed data after sorting, filtering and grouping are applied. It can be called with the "await" keyword for asynchronous operation.
Applies sorting, filtering and grouping using the information from the DataSourceRequest object. If the collection is already paged, the method returns an empty result.
public static Task<TreeDataSourceResult> ToTreeDataSourceResultAsync<TModel, T1, T2, TResult>(this IEnumerable<TModel> enumerable, DataSourceRequest request, Expression<Func<TModel, T1>> idSelector, Expression<Func<TModel, T2>> parentIDSelector, Expression<Func<TModel, bool>> rootSelector, Func<TModel, TResult> selector)
An instance of IEnumerable.
requestDataSourceRequestAn instance of DataSourceRequest.
idSelectorExpression<Func<TModel, T1>>The lambda which configures the selector of the ID field.
parentIDSelectorExpression<Func<TModel, T2>>The lambda which configures the parent selector.
rootSelectorExpression<Func<TModel, bool>>The lambda which configures the root selector.
selectorFunc<TModel, TResult>A projection function to apply to each element.
Returns:A Task of TreeDataSourceResult object, which contains the processed data after sorting, filtering and grouping are applied. It can be called with the "await" keyword for asynchronous operation.
Applies sorting, filtering and grouping using the information from the DataSourceRequest object. If the collection is already paged, the method returns an empty result.
public static Task<TreeDataSourceResult> ToTreeDataSourceResultAsync<TModel, T1, T2, TResult>(this IEnumerable<TModel> enumerable, DataSourceRequest request, Expression<Func<TModel, T1>> idSelector, Expression<Func<TModel, T2>> parentIDSelector, Expression<Func<TModel, bool>> rootSelector, ModelStateDictionary modelState, Func<TModel, TResult> selector, CancellationToken cancellationToken)
An instance of IEnumerable.
requestDataSourceRequestAn instance of DataSourceRequest.
idSelectorExpression<Func<TModel, T1>>The lambda which configures the selector of the ID field.
parentIDSelectorExpression<Func<TModel, T2>>The lambda which configures the parent selector.
rootSelectorExpression<Func<TModel, bool>>The lambda which configures the root selector.
modelStateModelStateDictionaryAn instance of ModelStateDictionary.
selectorFunc<TModel, TResult>A projection function to apply to each element.
cancellationTokenCancellationTokenAn instance of CancellationToken.
Returns:A Task of TreeDataSourceResult object, which contains the processed data after sorting, filtering and grouping are applied. It can be called with the "await" keyword for asynchronous operation.
Applies sorting, filtering and grouping using the information from the DataSourceRequest object. If the collection is already paged, the method returns an empty result.
public static Task<TreeDataSourceResult> ToTreeDataSourceResultAsync<TModel, T1, T2, TResult>(this IEnumerable<TModel> enumerable, DataSourceRequest request, Expression<Func<TModel, T1>> idSelector, Expression<Func<TModel, T2>> parentIDSelector, Expression<Func<TModel, bool>> rootSelector, ModelStateDictionary modelState, Func<TModel, TResult> selector)
An instance of IEnumerable.
requestDataSourceRequestAn instance of DataSourceRequest.
idSelectorExpression<Func<TModel, T1>>The lambda which configures the selector of the ID field.
parentIDSelectorExpression<Func<TModel, T2>>The lambda which configures the parent selector.
rootSelectorExpression<Func<TModel, bool>>The lambda which configures the root selector.
modelStateModelStateDictionaryAn instance of ModelStateDictionary.
selectorFunc<TModel, TResult>A projection function to apply to each element.
Returns:A Task of TreeDataSourceResult object, which contains the processed data after sorting, filtering and grouping are applied. It can be called with the "await" keyword for asynchronous operation.
Applies sorting, filtering and grouping using the information from the DataSourceRequest object. If the collection is already paged, the method returns an empty result.
public static Task<TreeDataSourceResult> ToTreeDataSourceResultAsync<TModel, T1, T2, TResult>(this IEnumerable<TModel> enumerable, DataSourceRequest request, Expression<Func<TModel, T1>> idSelector, Expression<Func<TModel, T2>> parentIDSelector, Func<TModel, TResult> selector, CancellationToken cancellationToken)
An instance of IEnumerable.
requestDataSourceRequestAn instance of DataSourceRequest.
idSelectorExpression<Func<TModel, T1>>The lambda which configures the selector of the ID field.
parentIDSelectorExpression<Func<TModel, T2>>The lambda which configures the parent selector.
selectorFunc<TModel, TResult>A projection function to apply to each element.
cancellationTokenCancellationTokenAn instance of CancellationToken.
Returns:A Task of TreeDataSourceResult object, which contains the processed data after sorting, filtering and grouping are applied. It can be called with the "await" keyword for asynchronous operation.
Applies sorting, filtering and grouping using the information from the DataSourceRequest object. If the collection is already paged, the method returns an empty result.
public static Task<TreeDataSourceResult> ToTreeDataSourceResultAsync<TModel, T1, T2, TResult>(this IEnumerable<TModel> enumerable, DataSourceRequest request, Expression<Func<TModel, T1>> idSelector, Expression<Func<TModel, T2>> parentIDSelector, Func<TModel, TResult> selector)
An instance of IEnumerable.
requestDataSourceRequestAn instance of DataSourceRequest.
idSelectorExpression<Func<TModel, T1>>The lambda which configures the selector of the ID field.
parentIDSelectorExpression<Func<TModel, T2>>The lambda which configures the parent selector.
selectorFunc<TModel, TResult>A projection function to apply to each element.
Returns:A Task of TreeDataSourceResult object, which contains the processed data after sorting, filtering and grouping are applied. It can be called with the "await" keyword for asynchronous operation.
Applies sorting, filtering and grouping using the information from the DataSourceRequest object. If the collection is already paged, the method returns an empty result.
public static Task<TreeDataSourceResult> ToTreeDataSourceResultAsync<TModel, T1, T2, TResult>(this IEnumerable<TModel> enumerable, DataSourceRequest request, Expression<Func<TModel, T1>> idSelector, Expression<Func<TModel, T2>> parentIDSelector, ModelStateDictionary modelState, Func<TModel, TResult> selector, CancellationToken cancellationToken)
An instance of IEnumerable.
requestDataSourceRequestAn instance of DataSourceRequest.
idSelectorExpression<Func<TModel, T1>>The lambda which configures the selector of the ID field.
parentIDSelectorExpression<Func<TModel, T2>>The lambda which configures the parent selector.
modelStateModelStateDictionaryAn instance of ModelStateDictionary.
selectorFunc<TModel, TResult>A projection function to apply to each element.
cancellationTokenCancellationTokenAn instance of CancellationToken.
Returns:A Task of TreeDataSourceResult object, which contains the processed data after sorting, filtering and grouping are applied. It can be called with the "await" keyword for asynchronous operation.
Applies sorting, filtering and grouping using the information from the DataSourceRequest object. If the collection is already paged, the method returns an empty result.
public static Task<TreeDataSourceResult> ToTreeDataSourceResultAsync<TModel, T1, T2, TResult>(this IEnumerable<TModel> enumerable, DataSourceRequest request, Expression<Func<TModel, T1>> idSelector, Expression<Func<TModel, T2>> parentIDSelector, ModelStateDictionary modelState, Func<TModel, TResult> selector)
An instance of IEnumerable.
requestDataSourceRequestAn instance of DataSourceRequest.
idSelectorExpression<Func<TModel, T1>>The lambda which configures the selector of the ID field.
parentIDSelectorExpression<Func<TModel, T2>>The lambda which configures the parent selector.
modelStateModelStateDictionaryAn instance of ModelStateDictionary.
selectorFunc<TModel, TResult>A projection function to apply to each element.
Returns:A Task of TreeDataSourceResult object, which contains the processed data after sorting, filtering and grouping are applied. It can be called with the "await" keyword for asynchronous operation.
Applies sorting, filtering and grouping using the information from the DataSourceRequest object. If the collection is already paged, the method returns an empty result.
public static Task<TreeDataSourceResult> ToTreeDataSourceResultAsync<TModel, T1, T2, TResult>(this IQueryable<TModel> queryable, DataSourceRequest request, Expression<Func<TModel, T1>> idSelector, Expression<Func<TModel, T2>> parentIDSelector, Expression<Func<TModel, bool>> rootSelector, Func<TModel, TResult> selector, CancellationToken cancellationToken)
An instance of IQueryable.
requestDataSourceRequestAn instance of DataSourceRequest.
idSelectorExpression<Func<TModel, T1>>The lambda which configures the selector of the ID field.
parentIDSelectorExpression<Func<TModel, T2>>The lambda which configures the parent selector.
rootSelectorExpression<Func<TModel, bool>>The lambda which configures the root selector.
selectorFunc<TModel, TResult>A projection function to apply to each element.
cancellationTokenCancellationTokenAn instance of CancellationToken.
Returns:A Task of TreeDataSourceResult object, which contains the processed data after sorting, filtering and grouping are applied. It can be called with the "await" keyword for asynchronous operation.
Applies sorting, filtering and grouping using the information from the DataSourceRequest object. If the collection is already paged, the method returns an empty result.
public static Task<TreeDataSourceResult> ToTreeDataSourceResultAsync<TModel, T1, T2, TResult>(this IQueryable<TModel> queryable, DataSourceRequest request, Expression<Func<TModel, T1>> idSelector, Expression<Func<TModel, T2>> parentIDSelector, Expression<Func<TModel, bool>> rootSelector, Func<TModel, TResult> selector)
An instance of IQueryable.
requestDataSourceRequestAn instance of DataSourceRequest.
idSelectorExpression<Func<TModel, T1>>The lambda which configures the selector of the ID field.
parentIDSelectorExpression<Func<TModel, T2>>The lambda which configures the parent selector.
rootSelectorExpression<Func<TModel, bool>>The lambda which configures the root selector.
selectorFunc<TModel, TResult>A projection function to apply to each element.
Returns:A Task of TreeDataSourceResult object, which contains the processed data after sorting, filtering and grouping are applied. It can be called with the "await" keyword for asynchronous operation.
Applies sorting, filtering and grouping using the information from the DataSourceRequest object. If the collection is already paged, the method returns an empty result.
public static Task<TreeDataSourceResult> ToTreeDataSourceResultAsync<TModel, T1, T2, TResult>(this IQueryable<TModel> queryable, DataSourceRequest request, Expression<Func<TModel, T1>> idSelector, Expression<Func<TModel, T2>> parentIDSelector, Expression<Func<TModel, bool>> rootSelector, ModelStateDictionary modelState, Func<TModel, TResult> selector, CancellationToken cancellationToken)
An instance of IQueryable.
requestDataSourceRequestAn instance of DataSourceRequest.
idSelectorExpression<Func<TModel, T1>>The lambda which configures the selector of the ID field.
parentIDSelectorExpression<Func<TModel, T2>>The lambda which configures the parent selector.
rootSelectorExpression<Func<TModel, bool>>The lambda which configures the root selector.
modelStateModelStateDictionaryAn instance of ModelStateDictionary.
selectorFunc<TModel, TResult>A projection function to apply to each element.
cancellationTokenCancellationTokenAn instance of CancellationToken.
Returns:A Task of TreeDataSourceResult object, which contains the processed data after sorting, filtering and grouping are applied. It can be called with the "await" keyword for asynchronous operation.
Applies sorting, filtering and grouping using the information from the DataSourceRequest object. If the collection is already paged, the method returns an empty result.
public static Task<TreeDataSourceResult> ToTreeDataSourceResultAsync<TModel, T1, T2, TResult>(this IQueryable<TModel> queryable, DataSourceRequest request, Expression<Func<TModel, T1>> idSelector, Expression<Func<TModel, T2>> parentIDSelector, Expression<Func<TModel, bool>> rootSelector, ModelStateDictionary modelState, Func<TModel, TResult> selector)
An instance of IQueryable.
requestDataSourceRequestAn instance of DataSourceRequest.
idSelectorExpression<Func<TModel, T1>>The lambda which configures the selector of the ID field.
parentIDSelectorExpression<Func<TModel, T2>>The lambda which configures the parent selector.
rootSelectorExpression<Func<TModel, bool>>The lambda which configures the root selector.
modelStateModelStateDictionaryAn instance of ModelStateDictionary.
selectorFunc<TModel, TResult>A projection function to apply to each element.
Returns:A Task of TreeDataSourceResult object, which contains the processed data after sorting, filtering and grouping are applied. It can be called with the "await" keyword for asynchronous operation.
Applies sorting, filtering and grouping using the information from the DataSourceRequest object. If the collection is already paged, the method returns an empty result.
public static Task<TreeDataSourceResult> ToTreeDataSourceResultAsync<TModel, T1, T2, TResult>(this IQueryable<TModel> queryable, DataSourceRequest request, Expression<Func<TModel, T1>> idSelector, Expression<Func<TModel, T2>> parentIDSelector, Func<TModel, TResult> selector, CancellationToken cancellationToken)
An instance of IQueryable.
requestDataSourceRequestAn instance of DataSourceRequest.
idSelectorExpression<Func<TModel, T1>>The lambda which configures the selector of the ID field.
parentIDSelectorExpression<Func<TModel, T2>>The lambda which configures the parent selector.
selectorFunc<TModel, TResult>A projection function to apply to each element.
cancellationTokenCancellationTokenAn instance of CancellationToken.
Returns:A Task of TreeDataSourceResult object, which contains the processed data after sorting, filtering and grouping are applied. It can be called with the "await" keyword for asynchronous operation.
Applies sorting, filtering and grouping using the information from the DataSourceRequest object. If the collection is already paged, the method returns an empty result.
public static Task<TreeDataSourceResult> ToTreeDataSourceResultAsync<TModel, T1, T2, TResult>(this IQueryable<TModel> queryable, DataSourceRequest request, Expression<Func<TModel, T1>> idSelector, Expression<Func<TModel, T2>> parentIDSelector, Func<TModel, TResult> selector)
An instance of IQueryable.
requestDataSourceRequestAn instance of DataSourceRequest.
idSelectorExpression<Func<TModel, T1>>The lambda which configures the selector of the ID field.
parentIDSelectorExpression<Func<TModel, T2>>The lambda which configures the parent selector.
selectorFunc<TModel, TResult>A projection function to apply to each element.
Returns:A Task of TreeDataSourceResult object, which contains the processed data after sorting, filtering and grouping are applied. It can be called with the "await" keyword for asynchronous operation.
Applies sorting, filtering and grouping using the information from the DataSourceRequest object. If the collection is already paged, the method returns an empty result.
public static Task<TreeDataSourceResult> ToTreeDataSourceResultAsync<TModel, T1, T2, TResult>(this IQueryable<TModel> queryable, DataSourceRequest request, Expression<Func<TModel, T1>> idSelector, Expression<Func<TModel, T2>> parentIDSelector, ModelStateDictionary modelState, Func<TModel, TResult> selector, CancellationToken cancellationToken)
An instance of IQueryable.
requestDataSourceRequestAn instance of DataSourceRequest.
idSelectorExpression<Func<TModel, T1>>The lambda which configures the selector of the ID field.
parentIDSelectorExpression<Func<TModel, T2>>The lambda which configures the parent selector.
modelStateModelStateDictionaryAn instance of ModelStateDictionary.
selectorFunc<TModel, TResult>A projection function to apply to each element.
cancellationTokenCancellationTokenAn instance of CancellationToken.
Returns:A Task of TreeDataSourceResult object, which contains the processed data after sorting, filtering and grouping are applied. It can be called with the "await" keyword for asynchronous operation.
Applies sorting, filtering and grouping using the information from the DataSourceRequest object. If the collection is already paged, the method returns an empty result.
public static Task<TreeDataSourceResult> ToTreeDataSourceResultAsync<TModel, T1, T2, TResult>(this IQueryable<TModel> queryable, DataSourceRequest request, Expression<Func<TModel, T1>> idSelector, Expression<Func<TModel, T2>> parentIDSelector, ModelStateDictionary modelState, Func<TModel, TResult> selector)
An instance of IQueryable.
requestDataSourceRequestAn instance of DataSourceRequest.
idSelectorExpression<Func<TModel, T1>>The lambda which configures the selector of the ID field.
parentIDSelectorExpression<Func<TModel, T2>>The lambda which configures the parent selector.
modelStateModelStateDictionaryAn instance of ModelStateDictionary.
selectorFunc<TModel, TResult>A projection function to apply to each element.
Returns:A Task of TreeDataSourceResult object, which contains the processed data after sorting, filtering and grouping are applied. It can be called with the "await" keyword for asynchronous operation.
Applies sorting, filtering and grouping using the information from the DataSourceRequest object. If the collection is already paged, the method returns an empty result.
public static Task<TreeDataSourceResult> ToTreeDataSourceResultAsync<TModel, T1, T2>(this IEnumerable<TModel> enumerable, DataSourceRequest request, Expression<Func<TModel, T1>> idSelector, Expression<Func<TModel, T2>> parentIDSelector, CancellationToken cancellationToken)
An instance of IEnumerable.
requestDataSourceRequestAn instance of DataSourceRequest.
idSelectorExpression<Func<TModel, T1>>The lambda which configures the selector of the ID field.
parentIDSelectorExpression<Func<TModel, T2>>The lambda which configures the parent selector.
cancellationTokenCancellationTokenAn instance of CancellationToken.
Returns:A Task of TreeDataSourceResult object, which contains the processed data after sorting, filtering and grouping are applied. It can be called with the "await" keyword for asynchronous operation.
Applies sorting, filtering and grouping using the information from the DataSourceRequest object. If the collection is already paged, the method returns an empty result.
public static Task<TreeDataSourceResult> ToTreeDataSourceResultAsync<TModel, T1, T2>(this IEnumerable<TModel> enumerable, DataSourceRequest request, Expression<Func<TModel, T1>> idSelector, Expression<Func<TModel, T2>> parentIDSelector, Expression<Func<TModel, bool>> rootSelector, CancellationToken cancellationToken)
An instance of IEnumerable.
requestDataSourceRequestAn instance of DataSourceRequest.
idSelectorExpression<Func<TModel, T1>>The lambda which configures the selector of the ID field.
parentIDSelectorExpression<Func<TModel, T2>>The lambda which configures the parent selector.
rootSelectorExpression<Func<TModel, bool>>The lambda which configures the root selector.
cancellationTokenCancellationTokenAn instance of CancellationToken.
Returns:A Task of TreeDataSourceResult object, which contains the processed data after sorting, filtering and grouping are applied. It can be called with the "await" keyword for asynchronous operation.
Applies sorting, filtering and grouping using the information from the DataSourceRequest object. If the collection is already paged, the method returns an empty result.
public static Task<TreeDataSourceResult> ToTreeDataSourceResultAsync<TModel, T1, T2>(this IEnumerable<TModel> enumerable, DataSourceRequest request, Expression<Func<TModel, T1>> idSelector, Expression<Func<TModel, T2>> parentIDSelector, Expression<Func<TModel, bool>> rootSelector, ModelStateDictionary modelState, CancellationToken cancellationToken)
An instance of IEnumerable.
requestDataSourceRequestAn instance of DataSourceRequest.
idSelectorExpression<Func<TModel, T1>>The lambda which configures the selector of the ID field.
parentIDSelectorExpression<Func<TModel, T2>>The lambda which configures the parent selector.
rootSelectorExpression<Func<TModel, bool>>The lambda which configures the root selector.
modelStateModelStateDictionaryAn instance of ModelStateDictionary.
cancellationTokenCancellationTokenAn instance of CancellationToken.
Returns:A Task of TreeDataSourceResult object, which contains the processed data after sorting, filtering and grouping are applied. It can be called with the "await" keyword for asynchronous operation.
Applies sorting, filtering and grouping using the information from the DataSourceRequest object. If the collection is already paged, the method returns an empty result.
public static Task<TreeDataSourceResult> ToTreeDataSourceResultAsync<TModel, T1, T2>(this IEnumerable<TModel> enumerable, DataSourceRequest request, Expression<Func<TModel, T1>> idSelector, Expression<Func<TModel, T2>> parentIDSelector, Expression<Func<TModel, bool>> rootSelector, ModelStateDictionary modelState)
An instance of IEnumerable.
requestDataSourceRequestAn instance of DataSourceRequest.
idSelectorExpression<Func<TModel, T1>>The lambda which configures the selector of the ID field.
parentIDSelectorExpression<Func<TModel, T2>>The lambda which configures the parent selector.
rootSelectorExpression<Func<TModel, bool>>The lambda which configures the root selector.
modelStateModelStateDictionaryAn instance of ModelStateDictionary.
Returns:A Task of TreeDataSourceResult object, which contains the processed data after sorting, filtering and grouping are applied. It can be called with the "await" keyword for asynchronous operation.
Applies sorting, filtering and grouping using the information from the DataSourceRequest object. If the collection is already paged, the method returns an empty result.
public static Task<TreeDataSourceResult> ToTreeDataSourceResultAsync<TModel, T1, T2>(this IEnumerable<TModel> enumerable, DataSourceRequest request, Expression<Func<TModel, T1>> idSelector, Expression<Func<TModel, T2>> parentIDSelector, Expression<Func<TModel, bool>> rootSelector)
An instance of IEnumerable.
requestDataSourceRequestAn instance of DataSourceRequest.
idSelectorExpression<Func<TModel, T1>>The lambda which configures the selector of the ID field.
parentIDSelectorExpression<Func<TModel, T2>>The lambda which configures the parent selector.
rootSelectorExpression<Func<TModel, bool>>The lambda which configures the root selector.
Returns:A Task of TreeDataSourceResult object, which contains the processed data after sorting, filtering and grouping are applied. It can be called with the "await" keyword for asynchronous operation.
Applies sorting, filtering and grouping using the information from the DataSourceRequest object. If the collection is already paged, the method returns an empty result.
public static Task<TreeDataSourceResult> ToTreeDataSourceResultAsync<TModel, T1, T2>(this IEnumerable<TModel> enumerable, DataSourceRequest request, Expression<Func<TModel, T1>> idSelector, Expression<Func<TModel, T2>> parentIDSelector, ModelStateDictionary modelState, CancellationToken cancellationToken)
An instance of IEnumerable.
requestDataSourceRequestAn instance of DataSourceRequest.
idSelectorExpression<Func<TModel, T1>>The lambda which configures the selector of the ID field.
parentIDSelectorExpression<Func<TModel, T2>>The lambda which configures the parent selector.
modelStateModelStateDictionaryAn instance of ModelStateDictionary.
cancellationTokenCancellationTokenAn instance of CancellationToken.
Returns:A Task of TreeDataSourceResult object, which contains the processed data after sorting, filtering and grouping are applied. It can be called with the "await" keyword for asynchronous operation.
Applies sorting, filtering and grouping using the information from the DataSourceRequest object. If the collection is already paged, the method returns an empty result.
public static Task<TreeDataSourceResult> ToTreeDataSourceResultAsync<TModel, T1, T2>(this IEnumerable<TModel> enumerable, DataSourceRequest request, Expression<Func<TModel, T1>> idSelector, Expression<Func<TModel, T2>> parentIDSelector, ModelStateDictionary modelState)
An instance of IEnumerable.
requestDataSourceRequestAn instance of DataSourceRequest.
idSelectorExpression<Func<TModel, T1>>The lambda which configures the selector of the ID field.
parentIDSelectorExpression<Func<TModel, T2>>The lambda which configures the parent selector.
modelStateModelStateDictionaryAn instance of ModelStateDictionary.
Returns:A Task of TreeDataSourceResult object, which contains the processed data after sorting, filtering and grouping are applied. It can be called with the "await" keyword for asynchronous operation.
Applies sorting, filtering and grouping using the information from the DataSourceRequest object. If the collection is already paged, the method returns an empty result.
public static Task<TreeDataSourceResult> ToTreeDataSourceResultAsync<TModel, T1, T2>(this IEnumerable<TModel> enumerable, DataSourceRequest request, Expression<Func<TModel, T1>> idSelector, Expression<Func<TModel, T2>> parentIDSelector)
An instance of IEnumerable.
requestDataSourceRequestAn instance of DataSourceRequest.
idSelectorExpression<Func<TModel, T1>>The lambda which configures the selector of the ID field.
parentIDSelectorExpression<Func<TModel, T2>>The lambda which configures the parent selector.
Returns:A Task of TreeDataSourceResult object, which contains the processed data after sorting, filtering and grouping are applied. It can be called with the "await" keyword for asynchronous operation.
Applies sorting, filtering and grouping using the information from the DataSourceRequest object. If the collection is already paged, the method returns an empty result.
public static Task<TreeDataSourceResult> ToTreeDataSourceResultAsync<TModel, T1, T2>(this IQueryable<TModel> queryable, DataSourceRequest request, Expression<Func<TModel, T1>> idSelector, Expression<Func<TModel, T2>> parentIDSelector, CancellationToken cancellationToken)
An instance of IQueryable.
requestDataSourceRequestAn instance of DataSourceRequest.
idSelectorExpression<Func<TModel, T1>>The lambda which configures the selector of the ID field.
parentIDSelectorExpression<Func<TModel, T2>>The lambda which configures the parent selector.
cancellationTokenCancellationTokenAn instance of CancellationToken.
Returns:A Task of TreeDataSourceResult object, which contains the processed data after sorting, filtering and grouping are applied. It can be called with the "await" keyword for asynchronous operation.
Applies sorting, filtering and grouping using the information from the DataSourceRequest object. If the collection is already paged, the method returns an empty result.
public static Task<TreeDataSourceResult> ToTreeDataSourceResultAsync<TModel, T1, T2>(this IQueryable<TModel> queryable, DataSourceRequest request, Expression<Func<TModel, T1>> idSelector, Expression<Func<TModel, T2>> parentIDSelector, Expression<Func<TModel, bool>> rootSelector, CancellationToken cancellationToken)
An instance of IQueryable.
requestDataSourceRequestAn instance of DataSourceRequest.
idSelectorExpression<Func<TModel, T1>>The lambda which configures the selector of the ID field.
parentIDSelectorExpression<Func<TModel, T2>>The lambda which configures the parent selector.
rootSelectorExpression<Func<TModel, bool>>The lambda which configures the root selector.
cancellationTokenCancellationTokenAn instance of CancellationToken.
Returns:A Task of TreeDataSourceResult object, which contains the processed data after sorting, filtering and grouping are applied. It can be called with the "await" keyword for asynchronous operation.
Applies sorting, filtering and grouping using the information from the DataSourceRequest object. If the collection is already paged, the method returns an empty result.
public static Task<TreeDataSourceResult> ToTreeDataSourceResultAsync<TModel, T1, T2>(this IQueryable<TModel> queryable, DataSourceRequest request, Expression<Func<TModel, T1>> idSelector, Expression<Func<TModel, T2>> parentIDSelector, Expression<Func<TModel, bool>> rootSelector, ModelStateDictionary modelState, CancellationToken cancellationToken)
An instance of IQueryable.
requestDataSourceRequestAn instance of DataSourceRequest.
idSelectorExpression<Func<TModel, T1>>The lambda which configures the selector of the ID field.
parentIDSelectorExpression<Func<TModel, T2>>The lambda which configures the parent selector.
rootSelectorExpression<Func<TModel, bool>>The lambda which configures the root selector.
modelStateModelStateDictionaryAn instance of ModelStateDictionary.
cancellationTokenCancellationTokenAn instance of CancellationToken.
Returns:A Task of TreeDataSourceResult object, which contains the processed data after sorting, filtering and grouping are applied. It can be called with the "await" keyword for asynchronous operation.
Applies sorting, filtering and grouping using the information from the DataSourceRequest object. If the collection is already paged, the method returns an empty result.
public static Task<TreeDataSourceResult> ToTreeDataSourceResultAsync<TModel, T1, T2>(this IQueryable<TModel> queryable, DataSourceRequest request, Expression<Func<TModel, T1>> idSelector, Expression<Func<TModel, T2>> parentIDSelector, Expression<Func<TModel, bool>> rootSelector, ModelStateDictionary modelState)
An instance of IQueryable.
requestDataSourceRequestAn instance of DataSourceRequest.
idSelectorExpression<Func<TModel, T1>>The lambda which configures the selector of the ID field.
parentIDSelectorExpression<Func<TModel, T2>>The lambda which configures the parent selector.
rootSelectorExpression<Func<TModel, bool>>The lambda which configures the root selector.
modelStateModelStateDictionaryAn instance of ModelStateDictionary.
Returns:A Task of TreeDataSourceResult object, which contains the processed data after sorting, filtering and grouping are applied. It can be called with the "await" keyword for asynchronous operation.
Applies sorting, filtering and grouping using the information from the DataSourceRequest object. If the collection is already paged, the method returns an empty result.
public static Task<TreeDataSourceResult> ToTreeDataSourceResultAsync<TModel, T1, T2>(this IQueryable<TModel> queryable, DataSourceRequest request, Expression<Func<TModel, T1>> idSelector, Expression<Func<TModel, T2>> parentIDSelector, Expression<Func<TModel, bool>> rootSelector)
An instance of IQueryable.
requestDataSourceRequestAn instance of DataSourceRequest.
idSelectorExpression<Func<TModel, T1>>The lambda which configures the selector of the ID field.
parentIDSelectorExpression<Func<TModel, T2>>The lambda which configures the parent selector.
rootSelectorExpression<Func<TModel, bool>>The lambda which configures the root selector.
Returns:A Task of TreeDataSourceResult object, which contains the processed data after sorting, filtering and grouping are applied. It can be called with the "await" keyword for asynchronous operation.
Applies sorting, filtering and grouping using the information from the DataSourceRequest object. If the collection is already paged, the method returns an empty result.
public static Task<TreeDataSourceResult> ToTreeDataSourceResultAsync<TModel, T1, T2>(this IQueryable<TModel> queryable, DataSourceRequest request, Expression<Func<TModel, T1>> idSelector, Expression<Func<TModel, T2>> parentIDSelector, ModelStateDictionary modelState, CancellationToken cancellationToken)
An instance of IQueryable.
requestDataSourceRequestAn instance of DataSourceRequest.
idSelectorExpression<Func<TModel, T1>>The lambda which configures the selector of the ID field.
parentIDSelectorExpression<Func<TModel, T2>>The lambda which configures the parent selector.
modelStateModelStateDictionaryAn instance of ModelStateDictionary.
cancellationTokenCancellationTokenAn instance of CancellationToken.
Returns:A Task of TreeDataSourceResult object, which contains the processed data after sorting, filtering and grouping are applied. It can be called with the "await" keyword for asynchronous operation.
Applies sorting, filtering and grouping using the information from the DataSourceRequest object. If the collection is already paged, the method returns an empty result.
public static Task<TreeDataSourceResult> ToTreeDataSourceResultAsync<TModel, T1, T2>(this IQueryable<TModel> queryable, DataSourceRequest request, Expression<Func<TModel, T1>> idSelector, Expression<Func<TModel, T2>> parentIDSelector, ModelStateDictionary modelState)
An instance of IQueryable.
requestDataSourceRequestAn instance of DataSourceRequest.
idSelectorExpression<Func<TModel, T1>>The lambda which configures the selector of the ID field.
parentIDSelectorExpression<Func<TModel, T2>>The lambda which configures the parent selector.
modelStateModelStateDictionaryAn instance of ModelStateDictionary.
Returns:A Task of TreeDataSourceResult object, which contains the processed data after sorting, filtering and grouping are applied. It can be called with the "await" keyword for asynchronous operation.
Applies sorting, filtering and grouping using the information from the DataSourceRequest object. If the collection is already paged, the method returns an empty result.
public static Task<TreeDataSourceResult> ToTreeDataSourceResultAsync<TModel, T1, T2>(this IQueryable<TModel> queryable, DataSourceRequest request, Expression<Func<TModel, T1>> idSelector, Expression<Func<TModel, T2>> parentIDSelector)
An instance of IQueryable.
requestDataSourceRequestAn instance of DataSourceRequest.
idSelectorExpression<Func<TModel, T1>>The lambda which configures the selector of the ID field.
parentIDSelectorExpression<Func<TModel, T2>>The lambda which configures the parent selector.
Returns:A Task of TreeDataSourceResult object, which contains the processed data after sorting, filtering and grouping are applied. It can be called with the "await" keyword for asynchronous operation.
Applies sorting, filtering and grouping using the information from the DataSourceRequest object. If the collection is already paged, the method returns an empty result.
public static Task<TreeDataSourceResult> ToTreeDataSourceResultAsync<TModel, TResult>(this IEnumerable<TModel> enumerable, DataSourceRequest request, Func<TModel, TResult> selector, CancellationToken cancellationToken)
An instance of IEnumerable.
requestDataSourceRequestAn instance of DataSourceRequest.
selectorFunc<TModel, TResult>A projection function to apply to each element.
cancellationTokenCancellationTokenAn instance of CancellationToken.
Returns:A Task of TreeDataSourceResult object, which contains the processed data after sorting, filtering and grouping are applied. It can be called with the "await" keyword for asynchronous operation.
Applies sorting, filtering and grouping using the information from the DataSourceRequest object. If the collection is already paged, the method returns an empty result.
public static Task<TreeDataSourceResult> ToTreeDataSourceResultAsync<TModel, TResult>(this IEnumerable<TModel> enumerable, DataSourceRequest request, Func<TModel, TResult> selector)
An instance of IEnumerable.
requestDataSourceRequestAn instance of DataSourceRequest.
selectorFunc<TModel, TResult>A projection function to apply to each element.
Returns:A Task of TreeDataSourceResult object, which contains the processed data after sorting, filtering and grouping are applied. It can be called with the "await" keyword for asynchronous operation.
Applies sorting, filtering and grouping using the information from the DataSourceRequest object. If the collection is already paged, the method returns an empty result.
public static Task<TreeDataSourceResult> ToTreeDataSourceResultAsync<TModel, TResult>(this IQueryable<TModel> queryable, DataSourceRequest request, Func<TModel, TResult> selector, CancellationToken cancellationToken)
An instance of IQueryable.
requestDataSourceRequestAn instance of DataSourceRequest.
selectorFunc<TModel, TResult>A projection function to apply to each element.
cancellationTokenCancellationTokenAn instance of CancellationToken.
Returns:A Task of TreeDataSourceResult object, which contains the processed data after sorting, filtering and grouping are applied. It can be called with the "await" keyword for asynchronous operation.
Applies sorting, filtering and grouping using the information from the DataSourceRequest object. If the collection is already paged, the method returns an empty result.
public static Task<TreeDataSourceResult> ToTreeDataSourceResultAsync<TModel, TResult>(this IQueryable<TModel> queryable, DataSourceRequest request, Func<TModel, TResult> selector)
An instance of IQueryable.
requestDataSourceRequestAn instance of DataSourceRequest.
selectorFunc<TModel, TResult>A projection function to apply to each element.
Returns:A Task of TreeDataSourceResult object, which contains the processed data after sorting, filtering and grouping are applied. It can be called with the "await" keyword for asynchronous operation.
Produces the set union of two sequences by using the default equality comparer.
public static IQueryable Union(this IQueryable source, IQueryable second)
An IQueryable whose distinct elements form the first set for the union.
secondIQueryableAn IQueryable whose distinct elements form the first set for the union.
Returns:An IQueryable that contains the elements from both input sequences, excluding duplicates.
Exceptions: ArgumentNullExceptionsource is null.
Filters a sequence of values based on a predicate.
public static IQueryable Where(this IQueryable source, Expression predicate)
An IQueryable to filter.
predicateExpressionA function to test each element for a condition.
Returns:An IQueryable that contains elements from the input sequence
that satisfy the condition specified by predicate.
Filters a sequence of values based on a collection of IFilterDescriptor.
public static IQueryable Where(this IQueryable source, IEnumerable<IFilterDescriptor> filterDescriptors)
The source.
filterDescriptorsIEnumerable<IFilterDescriptor>The filter descriptors.
Returns:An IQueryable that contains elements from the input sequence
that satisfy the conditions specified by each filter descriptor in filterDescriptors.