Class DataOperations
DataOperation class that performs data operation in IEnumerable and IQueryable type data sources.
Inheritance
Namespace: Syncfusion.Blazor
Assembly: Syncfusion.Blazor.dll
Syntax
public static class DataOperations : Object
Methods
Execute(IEnumerable, DataManagerRequest)
Executes the query against the given data source and returns the resultant records.
Declaration
public static IEnumerable Execute(IEnumerable dataSource, DataManagerRequest query)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.IEnumerable | dataSource | Input data source against which the query to be executed. |
DataManagerRequest | query | Query to be executed. |
Returns
Type | Description |
---|---|
System.Collections.IEnumerable | IEnumerable - resultant records. |
Execute<T>(IEnumerable<T>, DataManagerRequest)
Executes the query against the given data source and returns the resultant records.
Declaration
public static IEnumerable<T> Execute<T>(IEnumerable<T> dataSource, DataManagerRequest query)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<T> | dataSource | Input data source against which the query to be executed. |
DataManagerRequest | query | Query to be executed. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<T> | IEnumerable - resultant records. |
Type Parameters
Name | Description |
---|---|
T | Type of the data source elements. |
Execute<T>(IQueryable<T>, DataManagerRequest)
Executes the query against the given data source and returns the resultant records.
Declaration
public static IQueryable<T> Execute<T>(IQueryable<T> dataSource, DataManagerRequest query)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.IQueryable<T> | dataSource | Input data source against which the query to be executed. |
DataManagerRequest | query | Query to be executed. |
Returns
Type | Description |
---|---|
System.Linq.IQueryable<T> | IQueryable - resultant records. |
Type Parameters
Name | Description |
---|---|
T | Type of the data source elements. |
PerformFiltering(IEnumerable, List<WhereFilter>, String)
Apply the given filter criteria against the data source and returns the filtered records.
Declaration
public static IEnumerable PerformFiltering(IEnumerable dataSource, List<WhereFilter> whereFilter, string condition)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.IEnumerable | dataSource | Data source to be filtered. |
System.Collections.Generic.List<WhereFilter> | whereFilter | List of filter criteria. |
System.String | condition | Filter merge condition. Value can be either AND or OR. |
Returns
Type | Description |
---|---|
System.Collections.IEnumerable | IEnumerable - filtered records. |
PerformFiltering<T>(IEnumerable<T>, List<WhereFilter>, String)
Apply the given filter criteria against the data source and returns the filtered records.
Declaration
public static IEnumerable<T> PerformFiltering<T>(IEnumerable<T> dataSource, List<WhereFilter> whereFilter, string condition)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<T> | dataSource | Data source to be filtered. |
System.Collections.Generic.List<WhereFilter> | whereFilter | List of filter criteria. |
System.String | condition | Filter merge condition. Value can be either AND or OR. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<T> | IEnumerable - filtered records. |
Type Parameters
Name | Description |
---|---|
T | Type of the data source elements. |
PerformFiltering<T>(IQueryable<T>, List<WhereFilter>, String)
Apply the given filter criteria against the data source and returns the filtered records.
Declaration
public static IQueryable<T> PerformFiltering<T>(IQueryable<T> dataSource, List<WhereFilter> whereFilter, string condition)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.IQueryable<T> | dataSource | Data source to be filtered. |
System.Collections.Generic.List<WhereFilter> | whereFilter | List of filter criteria. |
System.String | condition | Filter merge condition. Value can be either AND or OR. |
Returns
Type | Description |
---|---|
System.Linq.IQueryable<T> | IQueryable - filtered records. |
Type Parameters
Name | Description |
---|---|
T | Type of the data source elements. |
PerformGrouping(IEnumerable, List<String>)
Groups data source by the given list of column names.
Declaration
public static IEnumerable PerformGrouping(IEnumerable dataSource, List<string> grouped)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.IEnumerable | dataSource | Input data source to be grouped. |
System.Collections.Generic.List<System.String> | grouped | List of column names by which rows will be grouped. |
Returns
Type | Description |
---|---|
System.Collections.IEnumerable | IEnumerable. |
PerformGrouping<T>(IEnumerable<T>, List<String>)
Groups data source by the given list of column names.
Declaration
public static IEnumerable PerformGrouping<T>(IEnumerable<T> dataSource, List<string> grouped)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<T> | dataSource | Input data source to be grouped. |
System.Collections.Generic.List<System.String> | grouped | List of column names by which rows will be grouped. |
Returns
Type | Description |
---|---|
System.Collections.IEnumerable | IEnumerable. |
Type Parameters
Name | Description |
---|---|
T | Type of the data source elements. |
PerformGrouping<T>(IQueryable<T>, List<String>)
Groups data source by the given list of column names.
Declaration
public static IQueryable PerformGrouping<T>(IQueryable<T> dataSource, List<string> grouped)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.IQueryable<T> | dataSource | Input data source to be grouped. |
System.Collections.Generic.List<System.String> | grouped | List of column names by which rows will be grouped. |
Returns
Type | Description |
---|---|
System.Linq.IQueryable | IQueryable. |
Type Parameters
Name | Description |
---|---|
T | Type of the data source elements. |
PerformSearching(IEnumerable, List<SearchFilter>)
Apply the given search criteria against the data source and returns the filtered records.
Declaration
public static IEnumerable PerformSearching(IEnumerable dataSource, List<SearchFilter> searchFilter)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.IEnumerable | dataSource | Data source to be filtered. |
System.Collections.Generic.List<SearchFilter> | searchFilter | List of search criteria. |
Returns
Type | Description |
---|---|
System.Collections.IEnumerable | IEnumerable - searched records. |
PerformSearching<T>(IEnumerable<T>, List<SearchFilter>)
Apply the given search criteria against the data source and returns the filtered records.
Declaration
public static IEnumerable<T> PerformSearching<T>(IEnumerable<T> dataSource, List<SearchFilter> searchFilter)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<T> | dataSource | Data source to be filtered. |
System.Collections.Generic.List<SearchFilter> | searchFilter | List of search criteria. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<T> | IEnumerable - searched records. |
Type Parameters
Name | Description |
---|---|
T | Type of the data source elements. |
PerformSearching<T>(IQueryable<T>, List<SearchFilter>)
Apply the given search criteria against the data source and returns the filtered records.
Declaration
public static IQueryable<T> PerformSearching<T>(IQueryable<T> dataSource, List<SearchFilter> searchFilter)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.IQueryable<T> | dataSource | Data source to be filtered. |
System.Collections.Generic.List<SearchFilter> | searchFilter | List of search criteria. |
Returns
Type | Description |
---|---|
System.Linq.IQueryable<T> | IQueryable - searched records. |
Type Parameters
Name | Description |
---|---|
T | Type of the data source elements. |
PerformSelect(IEnumerable, List<String>)
Selected the given field names alone from the data source.
Declaration
public static IEnumerable PerformSelect(IEnumerable dataSource, List<string> select)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.IEnumerable | dataSource | Input data source. |
System.Collections.Generic.List<System.String> | select | List of fields to select. |
Returns
Type | Description |
---|---|
System.Collections.IEnumerable | IEnumerale. |
PerformSelect<T>(IQueryable<T>, List<String>)
Selected the given field names alone from the data source.
Declaration
public static IQueryable PerformSelect<T>(IQueryable<T> dataSource, List<string> select)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.IQueryable<T> | dataSource | Input data source. |
System.Collections.Generic.List<System.String> | select | List of fields to select. |
Returns
Type | Description |
---|---|
System.Linq.IQueryable | IQueryable. |
Type Parameters
Name | Description |
---|---|
T | Type of the data source elements. |
PerformSkip(IEnumerable, Int32)
Skip the given number of records from data source and returns the resultant records.
Declaration
public static IEnumerable PerformSkip(IEnumerable dataSource, int skip)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.IEnumerable | dataSource | Input data source. |
System.Int32 | skip | Number of records to be skipped. |
Returns
Type | Description |
---|---|
System.Collections.IEnumerable | IEnumerable. |
PerformSkip<T>(IEnumerable<T>, Int32)
Skip the given number of records from data source and returns the resultant records.
Declaration
public static IEnumerable<T> PerformSkip<T>(IEnumerable<T> dataSource, int skip)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<T> | dataSource | Input data source. |
System.Int32 | skip | Number of records to be skipped. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<T> | IEnumerable. |
Type Parameters
Name | Description |
---|---|
T | Type of the data source elements. |
PerformSkip<T>(IQueryable<T>, Int32)
Skip the given number of records from data source and returns the resultant records.
Declaration
public static IQueryable<T> PerformSkip<T>(IQueryable<T> dataSource, int skip)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.IQueryable<T> | dataSource | Input data source. |
System.Int32 | skip | Number of records to be skipped. |
Returns
Type | Description |
---|---|
System.Linq.IQueryable<T> | IQueryable. |
Type Parameters
Name | Description |
---|---|
T | Type of the data source elements. |
PerformSorting(IEnumerable, List<Sort>)
Sorts the data source using the given sort descriptor and returns the sorted records.
Declaration
public static IEnumerable PerformSorting(IEnumerable dataSource, List<Sort> sortedColumns)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.IEnumerable | dataSource | Data source to be sorted. |
System.Collections.Generic.List<Sort> | sortedColumns | List of sort criteria. |
Returns
Type | Description |
---|---|
System.Collections.IEnumerable | IEnumerable - sorted records. |
PerformSorting(IEnumerable, List<SortedColumn>)
Sorts the data source using the given sort descriptor and returns the sorted records.
Declaration
public static IEnumerable PerformSorting(IEnumerable dataSource, List<SortedColumn> sortedColumns)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.IEnumerable | dataSource | Data source to be sorted. |
System.Collections.Generic.List<SortedColumn> | sortedColumns | List of sort criteria. |
Returns
Type | Description |
---|---|
System.Collections.IEnumerable | IEnumerable - sorted records. |
PerformSorting<T>(IEnumerable<T>, List<Sort>)
Sorts the data source using the given sort descriptor and returns the sorted records.
Declaration
public static IEnumerable<T> PerformSorting<T>(IEnumerable<T> dataSource, List<Sort> sortedColumns)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<T> | dataSource | Data source to be sorted. |
System.Collections.Generic.List<Sort> | sortedColumns | List of sort criteria. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<T> | IEnumerable - sorted records. |
Type Parameters
Name | Description |
---|---|
T | Type of the data source elements. |
PerformSorting<T>(IEnumerable<T>, List<SortedColumn>)
Sorts the data source using the given sort descriptor and returns the sorted records.
Declaration
public static IEnumerable<T> PerformSorting<T>(IEnumerable<T> dataSource, List<SortedColumn> sortedColumns)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<T> | dataSource | Data source to be sorted. |
System.Collections.Generic.List<SortedColumn> | sortedColumns | List of sort criteria. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<T> | IEnumerable - sorted records. |
Type Parameters
Name | Description |
---|---|
T | Type of the data source elements. |
PerformSorting<T>(IQueryable<T>, List<Sort>)
Sorts the data source using the given sort descriptor and returns the sorted records.
Declaration
public static IQueryable<T> PerformSorting<T>(IQueryable<T> dataSource, List<Sort> sortedColumns)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.IQueryable<T> | dataSource | Data source to be sorted. |
System.Collections.Generic.List<Sort> | sortedColumns | List of sort criteria. |
Returns
Type | Description |
---|---|
System.Linq.IQueryable<T> | IQueryable - sorted records. |
Type Parameters
Name | Description |
---|---|
T | Type of the data source elements. |
PerformSorting<T>(IQueryable<T>, List<SortedColumn>)
Sorts the data source using the given sort descriptor and returns the sorted records.
Declaration
public static IQueryable<T> PerformSorting<T>(IQueryable<T> dataSource, List<SortedColumn> sortedColumns)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.IQueryable<T> | dataSource | Data source to be sorted. |
System.Collections.Generic.List<SortedColumn> | sortedColumns | List of sort criteria. |
Returns
Type | Description |
---|---|
System.Linq.IQueryable<T> | IQueryable - sorted records. |
Type Parameters
Name | Description |
---|---|
T | Type of the data source elements. |
PerformTake(IEnumerable, Int32)
Take the given number of records from data source.
Declaration
public static IEnumerable PerformTake(IEnumerable dataSource, int take)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.IEnumerable | dataSource | Input data source. |
System.Int32 | take | Number of records to be taken. |
Returns
Type | Description |
---|---|
System.Collections.IEnumerable | IEnumerable. |
PerformTake<T>(IEnumerable<T>, Int32)
Take the given number of records from data source.
Declaration
public static IEnumerable<T> PerformTake<T>(IEnumerable<T> dataSource, int take)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<T> | dataSource | Input data source. |
System.Int32 | take | Number of records to be taken. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<T> | IEnumerable. |
Type Parameters
Name | Description |
---|---|
T | Type of the data source elements. |
PerformTake<T>(IQueryable<T>, Int32)
Take the given number of records from data source.
Declaration
public static IQueryable<T> PerformTake<T>(IQueryable<T> dataSource, int take)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.IQueryable<T> | dataSource | Input data source. |
System.Int32 | take | Number of records to be taken. |
Returns
Type | Description |
---|---|
System.Linq.IQueryable<T> | IEnumerable. |
Type Parameters
Name | Description |
---|---|
T | Type of the data source elements. |