Class QueryableExtensions
Inheritance
Namespace: Syncfusion.Data.Extensions
Assembly: Syncfusion.Data.Portable.dll
Syntax
public static class QueryableExtensions : Object
Methods
AndAlsoPredicate(Expression, Expression)
Generates an ANDAlso binary expression for the given expressions.
Declaration
public static BinaryExpression AndAlsoPredicate(this Expression expression1, Expression expression2)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.Expressions.Expression | expression1 | The expression 1. |
System.Linq.Expressions.Expression | expression2 | The expression 2. |
Returns
Type | Description |
---|---|
System.Linq.Expressions.BinaryExpression | An ANDAlso binary expression for the given expressions. |
AndPredicate(Expression, Expression)
Generates an AND binary expression for the given expressions.
Declaration
public static BinaryExpression AndPredicate(this Expression expression1, Expression expression2)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.Expressions.Expression | expression1 | The expression 1. |
System.Linq.Expressions.Expression | expression2 | The expression 2. |
Returns
Type | Description |
---|---|
System.Linq.Expressions.BinaryExpression | An AND binary expression for the given expressions. |
Average(IQueryable, String)
Calculates the average by executing the expression obtained from the queryable average method based on the given source and the property name.
Declaration
public static object Average(this IQueryable source, string propertyName)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.IQueryable | source | The IQueryable source. |
System.String | propertyName | The property name. |
Returns
Type | Description |
---|---|
System.Object | The average by executing the expression obtained from the queryable average method based on the given source and the property name. |
Average(IQueryable, String, Expression<Func<String, Object, Object>>)
Calculates the average by executing the expression obtained from the queryable average method based on the given source, property name and the expression func.
Declaration
public static object Average(this IQueryable source, string propertyName, Expression<Func<string, object, object>> expressionFunc)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.IQueryable | source | The IQueryable source. |
System.String | propertyName | The property name. |
System.Linq.Expressions.Expression<System.Func<System.String, System.Object, System.Object>> | expressionFunc | The expression func. |
Returns
Type | Description |
---|---|
System.Object | The average by executing the expression obtained from the queryable average method based on the given source, property name and the expression func. |
Average(IQueryable, String, Type)
Calculates the average by executing the expression obtained from the queryable average method based on the given source and the property name.
Declaration
public static object Average(this IQueryable source, string propertyName, Type sourceType)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.IQueryable | source | The IQueryable source. |
System.String | propertyName | The property name. |
System.Type | sourceType | The source type. |
Returns
Type | Description |
---|---|
System.Object | The average by executing the expression obtained from the queryable average method based on the given source and the property name. |
Count(IQueryable)
Gets the execution times count of the given queryable source.
Declaration
public static int Count(this IQueryable source)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.IQueryable | source | The source which is to be queried. |
Returns
Type | Description |
---|---|
System.Int32 | The count of the execution times of the given queryable source. |
ElementAt(IQueryable, Int32)
Gets the element at the given index and the source.
Declaration
public static object ElementAt(this IQueryable source, int index)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.IQueryable | source | The IQueryable source. |
System.Int32 | index | The index at which the element is to be obtained. |
Returns
Type | Description |
---|---|
System.Object | The element at the given index and the source. |
ElementAt(IQueryable, Int32, Type)
Gets the element at the given index and the source.
Declaration
public static object ElementAt(this IQueryable source, int index, Type sourceType)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.IQueryable | source | The IQueryable source. |
System.Int32 | index | The index at which the element is to be obtained. |
System.Type | sourceType | The type of the source. |
Returns
Type | Description |
---|---|
System.Object | The element at the given index and the source. |
ElementAtOrDefault(IQueryable, Int32)
Gets the element at or default of the given index and the source.
Declaration
public static object ElementAtOrDefault(this IQueryable source, int index)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.IQueryable | source | The IQueryable source. |
System.Int32 | index | The index at which the element is to be obtained. |
Returns
Type | Description |
---|---|
System.Object | The element at the given index and the source. |
ElementAtOrDefault(IQueryable, Int32, Type)
Gets the element at or default of the given index and the source.
Declaration
public static object ElementAtOrDefault(this IQueryable source, int index, Type sourceType)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.IQueryable | source | The IQueryable source. |
System.Int32 | index | The index at which the element is to be obtained. |
System.Type | sourceType | The type of the source. |
Returns
Type | Description |
---|---|
System.Object | The element at or default of the given index and the type of source. |
Equal(ParameterExpression, String, Object)
Generates the equal expression for the given parameter expression, property and value.
Declaration
public static Expression Equal(this ParameterExpression parameterExpression, string propertyName, object value)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.Expressions.ParameterExpression | parameterExpression | The parameter expression based on which the expression is generated. |
System.String | propertyName | The property name for which the expression is to be generated. |
System.Object | value | The object. |
Returns
Type | Description |
---|---|
System.Linq.Expressions.Expression | The equal expression for the given parameter expression, property and value. |
Equal(ParameterExpression, String, Object, Type, Expression<Func<String, Object, Object>>)
Generates an equal expression for the given values.
Declaration
public static Expression Equal(this ParameterExpression parameterExpression, string propertyName, object value, Type elementType, Expression<Func<string, object, object>> expressionFunc)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.Expressions.ParameterExpression | parameterExpression | The parameter expression. |
System.String | propertyName | The property name for which the expression is generated. |
System.Object | value | The object. |
System.Type | elementType | The type of the element. |
System.Linq.Expressions.Expression<System.Func<System.String, System.Object, System.Object>> | expressionFunc | The expression func. |
Returns
Type | Description |
---|---|
System.Linq.Expressions.Expression | An equal expression for the given values. |
Equal(ParameterExpression, String, String)
Generates an equal binary expression for the given expression and the property name.
Declaration
public static BinaryExpression Equal(this ParameterExpression parameterExpression, string propertyName, string propertyName2)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.Expressions.ParameterExpression | parameterExpression | The parameter expression for generating the binary expression. |
System.String | propertyName | The property name 1. |
System.String | propertyName2 | The property name 2. |
Returns
Type | Description |
---|---|
System.Linq.Expressions.BinaryExpression | An equal binary expression for the given expression and the property name. |
GetExpression(ParameterExpression, String)
Gets the expression for the given property and the parameter expression.
Declaration
public static Expression GetExpression(this ParameterExpression parameterExpression, string propertyName)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.Expressions.ParameterExpression | parameterExpression | The parameter expression based on which the expression is generated. |
System.String | propertyName | The property name for which the expression is to be generated. |
Returns
Type | Description |
---|---|
System.Linq.Expressions.Expression | The expression for the given property and the parameter expression. |
GetObjectType(IQueryable)
Gets the type of the given source.
Declaration
public static Type GetObjectType(this IQueryable source)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.IQueryable | source | The source, whose type is to be obtained. |
Returns
Type | Description |
---|---|
System.Type | The type of the given object. |
GetValueExpression(ParameterExpression, String, Type)
Generates the value expression for the given property, source type and the parameter expression.
Declaration
public static Expression GetValueExpression(this ParameterExpression parameterExpression, string propertyName, Type sourceType)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.Expressions.ParameterExpression | parameterExpression | The parameter expression based on which the expression is generated. |
System.String | propertyName | The property name for which the expression is to be generated. |
System.Type | sourceType | The type of the source. |
Returns
Type | Description |
---|---|
System.Linq.Expressions.Expression | The value expression for the given property, source type and the parameter expression. |
GreaterThan(ParameterExpression, String, Object)
Generates a GreaterThan binary expression for the given parameter expression, property and the value.
Declaration
public static BinaryExpression GreaterThan(this ParameterExpression parameterExpression, string propertyName, object value)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.Expressions.ParameterExpression | parameterExpression | The parameter expression. |
System.String | propertyName | The property name. |
System.Object | value | The object. |
Returns
Type | Description |
---|---|
System.Linq.Expressions.BinaryExpression | A GreaterThan binary expression for the given parameter expression, property and the value. |
GreaterThan(ParameterExpression, String, Object, Type, Expression<Func<String, Object, Object>>)
Generates a GreaterThan expression for the given values.
Declaration
public static Expression GreaterThan(this ParameterExpression parameterExpression, string propertyName, object value, Type elementType, Expression<Func<string, object, object>> expressionFunc)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.Expressions.ParameterExpression | parameterExpression | The parameter expression. |
System.String | propertyName | The property name. |
System.Object | value | The object. |
System.Type | elementType | The element type. |
System.Linq.Expressions.Expression<System.Func<System.String, System.Object, System.Object>> | expressionFunc | The expression func. |
Returns
Type | Description |
---|---|
System.Linq.Expressions.Expression | A GreaterThan expression for the given values. |
GreaterThan(ParameterExpression, String, String)
Generates a GreaterThan binary expression for the given expression and the property.
Declaration
public static BinaryExpression GreaterThan(this ParameterExpression parameterExpression, string propertyName, string propertyName2)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.Expressions.ParameterExpression | parameterExpression | The parameter expression. |
System.String | propertyName | The property name 1. |
System.String | propertyName2 | The property name 2. |
Returns
Type | Description |
---|---|
System.Linq.Expressions.BinaryExpression | A GreaterThan binary expression for the given values. |
GreaterThanOrEqual(ParameterExpression, String, Object)
Generates a GreaterThanOrEqual binary expression for the given expression, property and the value.
Declaration
public static BinaryExpression GreaterThanOrEqual(this ParameterExpression parameterExpression, string propertyName, object value)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.Expressions.ParameterExpression | parameterExpression | The parameter expression. |
System.String | propertyName | The property name. |
System.Object | value | The object. |
Returns
Type | Description |
---|---|
System.Linq.Expressions.BinaryExpression | A GreaterThanOrEqual binary expression for the given expression, property and the value. |
GreaterThanOrEqual(ParameterExpression, String, Object, Type, Expression<Func<String, Object, Object>>)
Generates a GreaterThanOrEqual binary expression for the given values.
Declaration
public static Expression GreaterThanOrEqual(this ParameterExpression parameterExpression, string propertyName, object value, Type elementType, Expression<Func<string, object, object>> expressionFunc)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.Expressions.ParameterExpression | parameterExpression | The parameter expression. |
System.String | propertyName | The property name. |
System.Object | value | The object. |
System.Type | elementType | The element type. |
System.Linq.Expressions.Expression<System.Func<System.String, System.Object, System.Object>> | expressionFunc | The expression func. |
Returns
Type | Description |
---|---|
System.Linq.Expressions.Expression | A GreaterThanOrEqual binary expression for the given values. |
GreaterThanOrEqual(ParameterExpression, String, String)
Generates a GreaterThanOrEqual binary expression for the given expressions and the property.
Declaration
public static BinaryExpression GreaterThanOrEqual(this ParameterExpression parameterExpression, string propertyName, string propertyName2)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.Expressions.ParameterExpression | parameterExpression | The parameter expression. |
System.String | propertyName | The property name 1. |
System.String | propertyName2 | The property name 2. |
Returns
Type | Description |
---|---|
System.Linq.Expressions.BinaryExpression | A GreaterThanOrEqual binary expression for the given expressions and the property. |
GroupBy(IQueryable, IEnumerable<SortColumn>)
Gets the GroupBy query expression for the given source and enumerable collection of the sort columns.
Declaration
public static IQueryable GroupBy(this IQueryable source, IEnumerable<SortColumn> groupByNames)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.IQueryable | source | The IQueryable source. |
System.Collections.Generic.IEnumerable<SortColumn> | groupByNames | The enumerable collection of the sort columns group by names. |
Returns
Type | Description |
---|---|
System.Linq.IQueryable | The GroupBy query expression for the given source and enumerable collection of the sort columns. |
GroupBy(IQueryable, IEnumerable<SortColumn>, Type)
Gets the GroupBy query expression for the given source and enumerable collection of the sort columns.
Declaration
public static IQueryable GroupBy(this IQueryable source, IEnumerable<SortColumn> groupByNames, Type sourceType)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.IQueryable | source | The IQueryable source. |
System.Collections.Generic.IEnumerable<SortColumn> | groupByNames | The enumerable collection of the sort columns group by names. |
System.Type | sourceType | The type of the source. |
Returns
Type | Description |
---|---|
System.Linq.IQueryable | The GroupBy query expression for the given source and enumerable collection of the sort columns. |
GroupBy(IQueryable, String, String)
Gets the GroupBy query expression for the given source, group name and sort action.
Declaration
public static IQueryable GroupBy(this IQueryable source, string groupByName, string sortAction)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.IQueryable | source | The IQueryable source. |
System.String | groupByName | The group by name which is the property name. |
System.String | sortAction | The sort action. |
Returns
Type | Description |
---|---|
System.Linq.IQueryable | The GroupBy query expression for the given source, group name and sort action. |
GroupBy(IQueryable, String, String, Type)
Gets the GroupBy query expression for the given source, group by name, source type and sort action.
Declaration
public static IQueryable GroupBy(this IQueryable source, string groupByName, string sortAction, Type sourceType)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.IQueryable | source | The IQueryable source. |
System.String | groupByName | The group by name which is the property name. |
System.String | sortAction | The sort action. |
System.Type | sourceType | The source type. |
Returns
Type | Description |
---|---|
System.Linq.IQueryable | The GroupBy query expression for the given source, group names and source type. |
GroupByMany(IEnumerable, Type, List<SortDescription>, Dictionary<String, IComparer<Object>>, Func<String, Expression>, String[])
Generates the GroupResult enumerable collection based on the given values.
Declaration
public static IEnumerable<GroupResult> GroupByMany(this IEnumerable source, Type sourceType, List<SortDescription> sortFields, Dictionary<string, IComparer<object>> sortComparers, Func<string, Expression> getExpressionFunc, params string[] properties)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.IEnumerable | source | The IEnumerable source. |
System.Type | sourceType | The type of the source. |
System.Collections.Generic.List<SortDescription> | sortFields | The list of sort descriptions. |
System.Collections.Generic.Dictionary<System.String, System.Collections.Generic.IComparer<System.Object>> | sortComparers | The dictionary of sort comparers. |
System.Func<System.String, System.Linq.Expressions.Expression> | getExpressionFunc | The expression func. |
System.String[] | properties | The array of properties. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<GroupResult> | The GroupResult enumerable collection based on the given values. |
GroupByMany(IEnumerable, Type, List<SortDescription>, Func<String, Expression>, String[])
Generates the GroupResult enumerable collection based on the given values.
Declaration
public static IEnumerable<GroupResult> GroupByMany(this IEnumerable source, Type sourceType, List<SortDescription> sortFields, Func<string, Expression> getExpressionFunc, params string[] properties)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.IEnumerable | source | The IEnumerable source. |
System.Type | sourceType | The type of the source. |
System.Collections.Generic.List<SortDescription> | sortFields | The list of sort descriptions. |
System.Func<System.String, System.Linq.Expressions.Expression> | getExpressionFunc | The expression func. |
System.String[] | properties | The array of properties. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<GroupResult> | The GroupResult enumerable collection based on the given values. |
GroupByMany(IEnumerable, Type, Func<String, Expression>, String[])
Generates the GroupResult enumerable collection based on the given values.
Declaration
public static IEnumerable<GroupResult> GroupByMany(this IEnumerable source, Type sourceType, Func<string, Expression> getExpressionFunc, params string[] properties)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.IEnumerable | source | The IQueryable source. |
System.Type | sourceType | The type of the source. |
System.Func<System.String, System.Linq.Expressions.Expression> | getExpressionFunc | The expression func. |
System.String[] | properties | The array of properties. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<GroupResult> | The GroupResult enumerable collection based on the given values. |
GroupByMany(DataTable, List<SortDescription>, String[])
Generates the GroupResult enumerable collection based on the given values.
Declaration
public static IEnumerable<GroupResult> GroupByMany(this DataTable source, List<SortDescription> sortFields, params string[] properties)
Parameters
Type | Name | Description |
---|---|---|
System.Data.DataTable | source | The DataTable source. |
System.Collections.Generic.List<SortDescription> | sortFields | The list of sort descriptions. |
System.String[] | properties | The array of properties. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<GroupResult> | The GroupResult enumerable collection for the given values. |
GroupByMany(DataTable, String[])
Generates the GroupResult enumerable collection based on the given values.
Declaration
public static IEnumerable<GroupResult> GroupByMany(this DataTable source, params string[] properties)
Parameters
Type | Name | Description |
---|---|---|
System.Data.DataTable | source | The DataTable source. |
System.String[] | properties | The array of properties. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<GroupResult> | The GroupResult enumerable collection for the given values. |
GroupByMany(DataView, List<SortDescription>, String[])
Generates the GroupResult enumerable collection based on the given values.
Declaration
public static IEnumerable<GroupResult> GroupByMany(this DataView source, List<SortDescription> sortFields, params string[] properties)
Parameters
Type | Name | Description |
---|---|---|
System.Data.DataView | source | The DataView source. |
System.Collections.Generic.List<SortDescription> | sortFields | The list of sort descriptions. |
System.String[] | properties | The array of properties. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<GroupResult> | The GroupResult enumerable collection for the given values. |
GroupByMany(DataView, String[])
Generates the GroupResult enumerable collection based on the given values.
Declaration
public static IEnumerable<GroupResult> GroupByMany(this DataView source, params string[] properties)
Parameters
Type | Name | Description |
---|---|---|
System.Data.DataView | source | The DataView source. |
System.String[] | properties | The array of properties. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<GroupResult> | The GroupResult enumerable collection for the given values. |
GroupByMany(DataView, Type, Func<String, Expression>, String[])
Generates the groups for the DataTable.
Declaration
public static IEnumerable<GroupResult> GroupByMany(this DataView source, Type sourceType, Func<string, Expression> getExpressionFunc, params string[] properties)
Parameters
Type | Name | Description |
---|---|---|
System.Data.DataView | source | The DataView source. |
System.Type | sourceType | The type of the source. |
System.Func<System.String, System.Linq.Expressions.Expression> | getExpressionFunc | The expression func. |
System.String[] | properties | The array of properties. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<GroupResult> | The groups for the DataTable. |
GroupByMany(IQueryable, Dictionary<String, String>, String[])
Generates the GroupResult enumerable collection based on the given values.
Declaration
public static IEnumerable<GroupResult> GroupByMany(this IQueryable source, Dictionary<string, string> formatCollection, params string[] properties)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.IQueryable | source | The IQueryable source. |
System.Collections.Generic.Dictionary<System.String, System.String> | formatCollection | The dictionary of format collection. |
System.String[] | properties | The array of properties. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<GroupResult> | The GroupResult enumerable collection for the given values. |
GroupByMany(IQueryable, Dictionary<String, String>, Type, String[])
Generates the GroupResult enumerable collection based on the given values.
Declaration
public static IEnumerable<GroupResult> GroupByMany(this IQueryable source, Dictionary<string, string> formatCollection, Type sourceType, params string[] properties)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.IQueryable | source | The IQueryable source. |
System.Collections.Generic.Dictionary<System.String, System.String> | formatCollection | The dictionary of format collection. |
System.Type | sourceType | The type of the source. |
System.String[] | properties | The array of properties. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<GroupResult> | The GroupResult enumerable collection based on the given values. |
GroupByMany(IQueryable, IEnumerable<String>)
Generates the GroupResult enumerable collection based on the given source and the properties passed.
Declaration
public static IEnumerable<GroupResult> GroupByMany(this IQueryable source, IEnumerable<string> properties)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.IQueryable | source | The IQueryable source |
System.Collections.Generic.IEnumerable<System.String> | properties | The enumerable collection of properties. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<GroupResult> | The GroupResult enumerable collection based on the given source and the properties passed. |
GroupByMany(IQueryable, String[])
Generates the GroupResult enumerable collection for the given source and the properties passed.
Declaration
public static IEnumerable<GroupResult> GroupByMany(this IQueryable source, params string[] properties)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.IQueryable | source | The IQueryable source. |
System.String[] | properties | The array of properties. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<GroupResult> | The GroupResult enumerable collection for the given source and the properties passed. |
GroupByMany(IQueryable, Type, List<SortDescription>, String[])
Generates the GroupResult enumerable collection based on the given values.
Declaration
public static IEnumerable<GroupResult> GroupByMany(this IQueryable source, Type sourceType, List<SortDescription> sortFields, params string[] properties)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.IQueryable | source | The IQueryable source. |
System.Type | sourceType | The type of the source. |
System.Collections.Generic.List<SortDescription> | sortFields | The list of sort descriptions. |
System.String[] | properties | The array of properties. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<GroupResult> | The GroupResult enumerable collection based on the given values. |
GroupByMany(IQueryable, Type, String[])
Generates the GroupResult enumerable collection based on the given source and the properties.
Declaration
public static IEnumerable<GroupResult> GroupByMany(this IQueryable source, Type sourceType, params string[] properties)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.IQueryable | source | The IQueryable source |
System.Type | sourceType | The type of the source. |
System.String[] | properties | The array of properties. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<GroupResult> | The GroupResult enumerable collection based on the given source and the properties. |
GroupByMany<TElement>(IEnumerable<TElement>, IEnumerable<Func<TElement, Object>>)
Generates the GroupResult enumerable collection based on the given values.
Declaration
public static IEnumerable<GroupResult> GroupByMany<TElement>(this IEnumerable<TElement> elements, IEnumerable<Func<TElement, object>> groupSelectors)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<TElement> | elements | The enumerable collection of the elements. |
System.Collections.Generic.IEnumerable<System.Func<TElement, System.Object>> | groupSelectors | The enumerable collection of func for the group selectors. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<GroupResult> | The GroupResult enumerable collection based on the given values. |
Type Parameters
Name | Description |
---|---|
TElement | The type parameter. |
GroupByMany<TElement>(IEnumerable<TElement>, List<SortDescription>, Dictionary<String, IComparer<Object>>, List<String>, Func<TElement, Object>[])
Generates the GroupResult enumerable collection based on the given values.
Declaration
public static IEnumerable<GroupResult> GroupByMany<TElement>(this IEnumerable<TElement> elements, List<SortDescription> sortFields, Dictionary<string, IComparer<object>> sortComparers, List<string> properties, params Func<TElement, object>[] groupSelectors)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<TElement> | elements | The enumerable collection of the elements. |
System.Collections.Generic.List<SortDescription> | sortFields | The list of sort descriptions. |
System.Collections.Generic.Dictionary<System.String, System.Collections.Generic.IComparer<System.Object>> | sortComparers | The sort comparers collection. |
System.Collections.Generic.List<System.String> | properties | The array of properties. |
System.Func<TElement, System.Object>[] | groupSelectors | The func for the group selectors. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<GroupResult> | The GroupResult enumerable collection based on the given values. |
Type Parameters
Name | Description |
---|---|
TElement | The type parameter. |
GroupByMany<TElement>(IEnumerable<TElement>, List<SortDescription>, Dictionary<String, IComparer<Object>>, String[], IEnumerable<Func<TElement, Object>>)
Generates the GroupResult enumerable collection based on the given values.
Declaration
public static IEnumerable<GroupResult> GroupByMany<TElement>(this IEnumerable<TElement> elements, List<SortDescription> sortFields, Dictionary<string, IComparer<object>> sortComparers, string[] properties, IEnumerable<Func<TElement, object>> groupSelectors)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<TElement> | elements | The enumerable collection of the elements. |
System.Collections.Generic.List<SortDescription> | sortFields | The list of sort descriptions. |
System.Collections.Generic.Dictionary<System.String, System.Collections.Generic.IComparer<System.Object>> | sortComparers | The sort comparers collection. |
System.String[] | properties | The array of properties. |
System.Collections.Generic.IEnumerable<System.Func<TElement, System.Object>> | groupSelectors | The enumerable collection of the func for the group selectors. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<GroupResult> | The GroupResult enumerable collection based on the given values. |
Type Parameters
Name | Description |
---|---|
TElement | The type of the elements. |
GroupByMany<TElement>(IEnumerable<TElement>, List<SortDescription>, IEnumerable<Func<TElement, Object>>)
Generates the GroupResult enumerable collection based on the given values.
Declaration
public static IEnumerable<GroupResult> GroupByMany<TElement>(this IEnumerable<TElement> elements, List<SortDescription> sortFields, IEnumerable<Func<TElement, object>> groupSelectors)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<TElement> | elements | The enumerable collection of the elements. |
System.Collections.Generic.List<SortDescription> | sortFields | The list of sort descriptions. |
System.Collections.Generic.IEnumerable<System.Func<TElement, System.Object>> | groupSelectors | The enumerable collection of the func for the group selectors. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<GroupResult> | The GroupResult enumerable collection based on the given values. |
Type Parameters
Name | Description |
---|---|
TElement | The type of the elements. |
GroupByMany<TElement>(IEnumerable<TElement>, List<SortDescription>, Func<TElement, Object>[])
Generates the GroupResult enumerable collection based on the given values.
Declaration
public static IEnumerable<GroupResult> GroupByMany<TElement>(this IEnumerable<TElement> elements, List<SortDescription> sortFields, params Func<TElement, object>[] groupSelectors)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<TElement> | elements | The enumerable collection of the elements. |
System.Collections.Generic.List<SortDescription> | sortFields | The list of sort descriptions. |
System.Func<TElement, System.Object>[] | groupSelectors | The func for the group selectors. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<GroupResult> | The GroupResult enumerable collection based on the given values. |
Type Parameters
Name | Description |
---|---|
TElement | The type of the elements. |
GroupByMany<TElement>(IEnumerable<TElement>, Func<TElement, Object>[])
Generates the GroupResult enumerable collection based on the given values.
Declaration
public static IEnumerable<GroupResult> GroupByMany<TElement>(this IEnumerable<TElement> elements, params Func<TElement, object>[] groupSelectors)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<TElement> | elements | The enumerable collection of the elements. |
System.Func<TElement, System.Object>[] | groupSelectors | The func for the group selectors. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<GroupResult> | The GroupResult enumerable collection based on the given values. |
Type Parameters
Name | Description |
---|---|
TElement | The type of the elements. |
LessThan(ParameterExpression, String, Object)
Generates a LessThan binary expression for the given expression, property and the values.
Declaration
public static BinaryExpression LessThan(this ParameterExpression parameterExpression, string propertyName, object value)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.Expressions.ParameterExpression | parameterExpression | The parameter expression. |
System.String | propertyName | The property name. |
System.Object | value | The object. |
Returns
Type | Description |
---|---|
System.Linq.Expressions.BinaryExpression | A LessThan binary expression for the given expression, property and the values. |
LessThan(ParameterExpression, String, Object, Type, Expression<Func<String, Object, Object>>)
Generates a LessThan expression for the given values.
Declaration
public static Expression LessThan(this ParameterExpression parameterExpression, string propertyName, object value, Type elementType, Expression<Func<string, object, object>> expressionFunc)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.Expressions.ParameterExpression | parameterExpression | The parameter expression. |
System.String | propertyName | The property name. |
System.Object | value | The object. |
System.Type | elementType | The element type. |
System.Linq.Expressions.Expression<System.Func<System.String, System.Object, System.Object>> | expressionFunc | The expression func. |
Returns
Type | Description |
---|---|
System.Linq.Expressions.Expression | A LessThan expression for the given values. |
LessThan(ParameterExpression, String, String)
Generates a LessThan binary expression for the given expression and the property.
Declaration
public static BinaryExpression LessThan(this ParameterExpression parameterExpression, string propertyName, string propertyName2)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.Expressions.ParameterExpression | parameterExpression | The parameter expression. |
System.String | propertyName | The property name 1. |
System.String | propertyName2 | The property name 2. |
Returns
Type | Description |
---|---|
System.Linq.Expressions.BinaryExpression | A LessThan binary expression for the given expression and the property. |
LessThanOrEqual(ParameterExpression, String, Object)
Generates a LessThanOrEqual binary expression for the given expression, property and the value.
Declaration
public static BinaryExpression LessThanOrEqual(this ParameterExpression parameterExpression, string propertyName, object value)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.Expressions.ParameterExpression | parameterExpression | The parameter expression. |
System.String | propertyName | The property name. |
System.Object | value | The object. |
Returns
Type | Description |
---|---|
System.Linq.Expressions.BinaryExpression | A LessThanOrEqual binary expression for the given expression, property and the value. |
LessThanOrEqual(ParameterExpression, String, Object, Type, Expression<Func<String, Object, Object>>)
Generates a LessThanOrEqual expression for the given values.
Declaration
public static Expression LessThanOrEqual(this ParameterExpression parameterExpression, string propertyName, object value, Type elementType, Expression<Func<string, object, object>> expressionFunc)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.Expressions.ParameterExpression | parameterExpression | The parameter expression. |
System.String | propertyName | The property name. |
System.Object | value | The object. |
System.Type | elementType | The element type. |
System.Linq.Expressions.Expression<System.Func<System.String, System.Object, System.Object>> | expressionFunc | The expression func. |
Returns
Type | Description |
---|---|
System.Linq.Expressions.Expression | A LessThanOrEqual expression for the given values. |
LessThanOrEqual(ParameterExpression, String, String)
Generates a LessThanOrEqual binary expression for the given expression and property.
Declaration
public static BinaryExpression LessThanOrEqual(this ParameterExpression parameterExpression, string propertyName, string propertyName2)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.Expressions.ParameterExpression | parameterExpression | The parameter expression. |
System.String | propertyName | The property name 1. |
System.String | propertyName2 | The property name 2. |
Returns
Type | Description |
---|---|
System.Linq.Expressions.BinaryExpression | A LessThanOrEqual binary expression for the given expression and property. |
Max(IQueryable, String)
Calculates the max object by executing the expression obtained from the queryable max method based on the given source and the property name.
Declaration
public static object Max(this IQueryable source, string propertyName)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.IQueryable | source | The IQueryable source. |
System.String | propertyName | The property name. |
Returns
Type | Description |
---|---|
System.Object | The max object by executing the expression obtained from the queryable max method based on the given source and the property name. |
Max(IQueryable, String, Expression<Func<String, Object, Object>>)
Calculates the max object by executing the expression obtained from the queryable max method based on the given values.
Declaration
public static object Max(this IQueryable source, string propertyName, Expression<Func<string, object, object>> expressionFunc)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.IQueryable | source | The IQueryable source. |
System.String | propertyName | The property name. |
System.Linq.Expressions.Expression<System.Func<System.String, System.Object, System.Object>> | expressionFunc | The expression func. |
Returns
Type | Description |
---|---|
System.Object | The max object by executing the expression obtained from the queryable max method based on the given values. |
Max(IQueryable, String, Type)
Calculates the max object by executing the expression obtained from the queryable max method based on the given source and the property name.
Declaration
public static object Max(this IQueryable source, string propertyName, Type sourceType)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.IQueryable | source | The IQueryable source. |
System.String | propertyName | The property name. |
System.Type | sourceType | The source type. |
Returns
Type | Description |
---|---|
System.Object | The max object by executing the expression obtained from the queryable max method based on the given source and the property name. |
Min(IQueryable, String)
Calculates the min object by executing the expression obtained from the queryable min method based on the given source and the property.
Declaration
public static object Min(this IQueryable source, string propertyName)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.IQueryable | source | The IQueryable source. |
System.String | propertyName | The property name. |
Returns
Type | Description |
---|---|
System.Object | The min object by executing the expression obtained from the queryable min method based on the given source and the property. |
Min(IQueryable, String, Expression<Func<String, Object, Object>>)
Calculates the min object by executing the expression obtained from the queryable min method based on the given values.
Declaration
public static object Min(this IQueryable source, string propertyName, Expression<Func<string, object, object>> expressionFunc)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.IQueryable | source | The IQueryable source. |
System.String | propertyName | The property name. |
System.Linq.Expressions.Expression<System.Func<System.String, System.Object, System.Object>> | expressionFunc | The expression func. |
Returns
Type | Description |
---|---|
System.Object | The min object by executing the expression obtained from the queryable min method based on the given values. |
Min(IQueryable, String, Type)
Calculates the min object by executing the expression obtained from the queryable min method based on the given source and the property.
Declaration
public static object Min(this IQueryable source, string propertyName, Type sourceType)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.IQueryable | source | The IQueryable source. |
System.String | propertyName | The property name. |
System.Type | sourceType | The source type. |
Returns
Type | Description |
---|---|
System.Object | The min object by executing the expression obtained from the queryable min method based on the given source and the property. |
NotEqual(ParameterExpression, String, Object)
Generates a NotEqual binary expression for the given parameter expression, property and the value.
Declaration
public static BinaryExpression NotEqual(this ParameterExpression parameterExpression, string propertyName, object value)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.Expressions.ParameterExpression | parameterExpression | The parameter expression. |
System.String | propertyName | The property name for which the expression is to be generated. |
System.Object | value | The object. |
Returns
Type | Description |
---|---|
System.Linq.Expressions.BinaryExpression | A NotEqual binary expression for the given parameter expression, property and the value. |
NotEqual(ParameterExpression, String, Object, Type, Expression<Func<String, Object, Object>>)
Generates a NotEqual expression for the given values.
Declaration
public static Expression NotEqual(this ParameterExpression parameterExpression, string propertyName, object value, Type elementType, Expression<Func<string, object, object>> expressionFunc)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.Expressions.ParameterExpression | parameterExpression | The parameter expression. |
System.String | propertyName | The property name for which the expression is generated. |
System.Object | value | The object. |
System.Type | elementType | The element type. |
System.Linq.Expressions.Expression<System.Func<System.String, System.Object, System.Object>> | expressionFunc | The expression func. |
Returns
Type | Description |
---|---|
System.Linq.Expressions.Expression | A NotEqual expression for the given values. |
NotEqual(ParameterExpression, String, String)
Generates an NotEqual binary expression for the given expression and property.
Declaration
public static BinaryExpression NotEqual(this ParameterExpression parameterExpression, string propertyName, string propertyName2)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.Expressions.ParameterExpression | parameterExpression | The parameter expression. |
System.String | propertyName | The property name 1. |
System.String | propertyName2 | The property name 2. |
Returns
Type | Description |
---|---|
System.Linq.Expressions.BinaryExpression | An NotEqual binary expression for the given expression and property. |
OfQueryable(IEnumerable)
Returns the queryable which iterates over the given collection of items.
Declaration
public static IEnumerable OfQueryable(this IEnumerable items)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.IEnumerable | items | The enumerable collection of the items, which should be queried. |
Returns
Type | Description |
---|---|
System.Collections.IEnumerable | The queryable which iterates over the given collection of items. |
OfQueryable(IEnumerable, Type)
Returns the queryable which iterates over the given collection of items.
Declaration
public static IEnumerable OfQueryable(this IEnumerable items, Type sourceType)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.IEnumerable | items | The enumerable collection of the items. |
System.Type | sourceType | The source type of the items. |
Returns
Type | Description |
---|---|
System.Collections.IEnumerable | The queryable which iterates over the given collection of items. |
OfType(IQueryable, Type)
Gets the queryable expression OfType for the given source and its type.
Declaration
public static IQueryable OfType(this IQueryable source, Type sourceType)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.IQueryable | source | The IQueryable source. |
System.Type | sourceType | The type of the source. |
Returns
Type | Description |
---|---|
System.Linq.IQueryable | The queryable expression OfType for the given source and its type. |
OfType<T1, T2>(ObservableCollection<T2>)
Gets the collection of the type parameter T2
for the given collection of
type parameter T1
.
Declaration
public static ObservableCollection<T1> OfType<T1, T2>(this ObservableCollection<T2> items)
where T2 : T1
Parameters
Type | Name | Description |
---|---|---|
System.Collections.ObjectModel.ObservableCollection<T2> | items | The collection of items. |
Returns
Type | Description |
---|---|
System.Collections.ObjectModel.ObservableCollection<T1> | The collection of the type parameter |
Type Parameters
Name | Description |
---|---|
T1 | The given type parameter. |
T2 | The target type parameter. |
OrderBy(IQueryable, ParameterExpression, Expression)
Generates a OrderBy query for the queryable source and the expressions.
Declaration
public static IQueryable OrderBy(this IQueryable source, ParameterExpression parameterExpression, Expression expression)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.IQueryable | source | The IQueryable source. |
System.Linq.Expressions.ParameterExpression | parameterExpression | The parameter expression which are the objects to populate to the parameter collection of the lambda expression. |
System.Linq.Expressions.Expression | expression | The expression to set the lambda expression body property equals to. |
Returns
Type | Description |
---|---|
System.Linq.IQueryable | A OrderBy query for the queryable source and the expressions. |
OrderBy(IQueryable, String)
Generates a OrderBy query for the queryable source and the property name.
Declaration
public static IQueryable OrderBy(this IQueryable source, string propertyName)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.IQueryable | source | The IQueryable source. |
System.String | propertyName | The property name for which the OrderBy query is to be generated. |
Returns
Type | Description |
---|---|
System.Linq.IQueryable | A OrderBy query for the queryable source and the property name. |
OrderBy(IQueryable, String, IComparer<Object>, Expression<Func<String, Object, Object>>)
Generates a OrderBy query for the queryable source, property name, expression func and the comparer.
Declaration
public static IQueryable OrderBy(this IQueryable source, string propertyName, IComparer<object> comparer, Expression<Func<string, object, object>> expressionFunc)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.IQueryable | source | The IQueryable source. |
System.String | propertyName | The property name for which the OrderBy query is to be generated. |
System.Collections.Generic.IComparer<System.Object> | comparer | The comparer based on which the query is to be generated. |
System.Linq.Expressions.Expression<System.Func<System.String, System.Object, System.Object>> | expressionFunc | The expression func based on which the query is to be generated. |
Returns
Type | Description |
---|---|
System.Linq.IQueryable | A OrderBy query for the queryable source, property name, expression func and the comparer. |
OrderBy(IQueryable, String, IComparer<Object>, Type)
Generates an OrderBy query for the given source, property and the comparer defined.
Declaration
public static IQueryable OrderBy(this IQueryable source, string propertyName, IComparer<object> comparer, Type sourceType)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.IQueryable | source | The IQueryable source. |
System.String | propertyName | The property name for which the OrderBy query is to be generated. |
System.Collections.Generic.IComparer<System.Object> | comparer | The comparer defined for the queryable expression. |
System.Type | sourceType | The source type. |
Returns
Type | Description |
---|---|
System.Linq.IQueryable | An OrderBy query for the given source, property and the comparer defined. |
OrderBy(IQueryable, String, Expression<Func<String, Object, Object>>)
Generates a OrderBy query for the queryable source, property name and the expression func.
Declaration
public static IQueryable OrderBy(this IQueryable source, string propertyName, Expression<Func<string, object, object>> expressionFunc)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.IQueryable | source | The IQueryable source. |
System.String | propertyName | The property name for which the OrderBy query is to be generated. |
System.Linq.Expressions.Expression<System.Func<System.String, System.Object, System.Object>> | expressionFunc | The expression func based on which the query is to be generated. |
Returns
Type | Description |
---|---|
System.Linq.IQueryable | A OrderBy query for the queryable source, property name and the expression func. |
OrderBy(IQueryable, String, Type)
Generates a OrderBy query for the queryable source, its type and the property name.
Declaration
public static IQueryable OrderBy(this IQueryable source, string propertyName, Type sourceType)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.IQueryable | source | The IQueryable source. |
System.String | propertyName | The property name for which the OrderBy query is to be generated. |
System.Type | sourceType | The type of the source. |
Returns
Type | Description |
---|---|
System.Linq.IQueryable | A OrderBy query for the queryable source, its type and the property name. |
OrderBy<T>(IQueryable, IComparer<T>)
Generates an OrderBy query for the IComparer defined and its source.
Declaration
public static IQueryable OrderBy<T>(this IQueryable source, IComparer<T> comparer)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.IQueryable | source | The IQueryable source. |
System.Collections.Generic.IComparer<T> | comparer | The comparer defined for the queryable expression. |
Returns
Type | Description |
---|---|
System.Linq.IQueryable | An OrderBy query for the IComparer defined and its source. |
Type Parameters
Name | Description |
---|---|
T | The type parameter for which the queryable expression is to be obtained. |
OrderBy<T>(IQueryable, IComparer<T>, Type)
Generates an OrderBy query for the IComparer defined, source and its type.
Declaration
public static IQueryable OrderBy<T>(this IQueryable source, IComparer<T> comparer, Type sourceType)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.IQueryable | source | The IQueryable source. |
System.Collections.Generic.IComparer<T> | comparer | The comparer defined for the queryable expression. |
System.Type | sourceType | The type of the source. |
Returns
Type | Description |
---|---|
System.Linq.IQueryable | An OrderBy query for the IComparer defined, source and its type. |
Type Parameters
Name | Description |
---|---|
T | The type parameter for which the queryable expression is to be obtained. |
OrderByDescending(IQueryable, ParameterExpression, Expression)
Generates the OrderByDescending query for the given source and expressions.
Declaration
public static IQueryable OrderByDescending(this IQueryable source, ParameterExpression parameterExpression, Expression expression)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.IQueryable | source | The IQueryable source. |
System.Linq.Expressions.ParameterExpression | parameterExpression | The parameter expression which are the objects to populate to the parameter collection of the lambda expression. |
System.Linq.Expressions.Expression | expression | The expression to set the lambda expression body property equals to. |
Returns
Type | Description |
---|---|
System.Linq.IQueryable | The OrderByDescending query for the given source and expressions. |
OrderByDescending(IQueryable, String)
Generates the OrderByDescending query for the given source and the property.
Declaration
public static IQueryable OrderByDescending(this IQueryable source, string propertyName)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.IQueryable | source | The IQueryable source. |
System.String | propertyName | The property name for which the query is to be generated. |
Returns
Type | Description |
---|---|
System.Linq.IQueryable | The OrderByDescending query for the given source and the property. |
OrderByDescending(IQueryable, String, IComparer<Object>, Expression<Func<String, Object, Object>>)
Generates the OrderByDescending query for the given source, property, expression func and the comparer defined.
Declaration
public static IQueryable OrderByDescending(this IQueryable source, string propertyName, IComparer<object> comparer, Expression<Func<string, object, object>> expressionFunc)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.IQueryable | source | The IQueryable source. |
System.String | propertyName | The property name for which the query is to be generated. |
System.Collections.Generic.IComparer<System.Object> | comparer | The comparer defined for the query. |
System.Linq.Expressions.Expression<System.Func<System.String, System.Object, System.Object>> | expressionFunc | The expression func based on which the query is to be generated. |
Returns
Type | Description |
---|---|
System.Linq.IQueryable | The OrderByDescending query for the given source, property, expression func and the comparer defined. |
OrderByDescending(IQueryable, String, IComparer<Object>, Type)
Generates an OrderByDescending query for the given source, property and the comparer defined.
Declaration
public static IQueryable OrderByDescending(this IQueryable source, string propertyName, IComparer<object> comparer, Type sourceType)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.IQueryable | source | The IQueryable source. |
System.String | propertyName | The property name for which the query is to be generated. |
System.Collections.Generic.IComparer<System.Object> | comparer | The comparer defined for the queryable expression. |
System.Type | sourceType | The type of the source. |
Returns
Type | Description |
---|---|
System.Linq.IQueryable | An OrderByDescending query for the given source, property and the comparer defined. |
OrderByDescending(IQueryable, String, Expression<Func<String, Object, Object>>)
Generates the OrderByDescending query for the given source, property and the expression func.
Declaration
public static IQueryable OrderByDescending(this IQueryable source, string propertyName, Expression<Func<string, object, object>> expressionFunc)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.IQueryable | source | The IQueryable source. |
System.String | propertyName | The property name for which the query is to be generated. |
System.Linq.Expressions.Expression<System.Func<System.String, System.Object, System.Object>> | expressionFunc | The expression func based on which the query is to be generated. |
Returns
Type | Description |
---|---|
System.Linq.IQueryable | The OrderByDescending query for the given source, property and the expression func. |
OrderByDescending(IQueryable, String, Type)
Generates a OrderByDescending query for the given source and the property.
Declaration
public static IQueryable OrderByDescending(this IQueryable source, string propertyName, Type sourceType)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.IQueryable | source | The IQueryable source. |
System.String | propertyName | The property name for which the query is to be generated. |
System.Type | sourceType | The type of the source. |
Returns
Type | Description |
---|---|
System.Linq.IQueryable | An OrderByDescending query for the given source and the property. |
OrderByDescending<T>(IQueryable, IComparer<T>)
Generates an OrderByDescending query for the given source and the comparer defined.
Declaration
public static IQueryable OrderByDescending<T>(this IQueryable source, IComparer<T> comparer)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.IQueryable | source | The IQueryable source. |
System.Collections.Generic.IComparer<T> | comparer | The comparer defined for the queryable expression. |
Returns
Type | Description |
---|---|
System.Linq.IQueryable | An OrderByDescending query for the given source and the comparer defined. |
Type Parameters
Name | Description |
---|---|
T | The type parameter for which the queryable expression is to be obtained. |
OrderByDescending<T>(IQueryable, IComparer<T>, Type)
Generates an OrderByDescending query of the given type parameter for the given source and comparer defined.
Declaration
public static IQueryable OrderByDescending<T>(this IQueryable source, IComparer<T> comparer, Type sourceType)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.IQueryable | source | The IQueryable source. |
System.Collections.Generic.IComparer<T> | comparer | The comparer defined for the queryable expression. |
System.Type | sourceType | The type of the source. |
Returns
Type | Description |
---|---|
System.Linq.IQueryable | An OrderByDescending query of the given type parameter for the given source and comparer defined. |
Type Parameters
Name | Description |
---|---|
T | The type parameter for which the queryable expression is to be obtained. |
OrElsePredicate(Expression, Expression)
Generates an OrElse binary expression for the given expressions.
Declaration
public static BinaryExpression OrElsePredicate(this Expression expression1, Expression expression2)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.Expressions.Expression | expression1 | The expression 1. |
System.Linq.Expressions.Expression | expression2 | The expression 2. |
Returns
Type | Description |
---|---|
System.Linq.Expressions.BinaryExpression | An OrElse binary expression for the given expressions. |
OrPredicate(Expression, Expression)
Generates an OR binary expression for the given expressions.
Declaration
public static BinaryExpression OrPredicate(this Expression expression1, Expression expression2)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.Expressions.Expression | expression1 | The expression 1. |
System.Linq.Expressions.Expression | expression2 | The expression 2. |
Returns
Type | Description |
---|---|
System.Linq.Expressions.BinaryExpression | An OR binary expression for the given expressions. |
Page(IQueryable, Int32, Int32)
Generates the page expression for the given source, page index and page size.
Declaration
public static IQueryable Page(this IQueryable source, int pageIndex, int pageSize)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.IQueryable | source | The IQueryable source. |
System.Int32 | pageIndex | The index of the page. |
System.Int32 | pageSize | The size of the page. |
Returns
Type | Description |
---|---|
System.Linq.IQueryable | The page expression for the given source, page index and page size. |
Parameter(IQueryable)
Creates a ParameterExpression that is required when building a series of predicates for the WHERE filter.
Use this same parameter passed to generate different predicates and finally to generate the Lambda.
Declaration
public static ParameterExpression Parameter(this IQueryable source)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.IQueryable | source | The IQueryable source. |
Returns
Type | Description |
---|---|
System.Linq.Expressions.ParameterExpression | A ParameterExpression that is required when building a series of predicates for the WHERE filter. |
Remarks
If we specify a parameter for every predicate, then the Lambda expression scope will be out of the WHERE query that gets generated.
Parameter(Type)
Generates the parameter expression for the given source type.
Declaration
public static ParameterExpression Parameter(this Type sourceType)
Parameters
Type | Name | Description |
---|---|---|
System.Type | sourceType | The source type. |
Returns
Type | Description |
---|---|
System.Linq.Expressions.ParameterExpression | The parameter expression for the given source type. |
Predicate(IQueryable, ParameterExpression, String, Object, FilterType, FilterBehavior, Boolean, Type)
Generates a predicate expression for the given values.
Predicate is a Binary expression that needs to be built for a single or a series of values that needs to be passed on to the WHERE expression.
Declaration
public static Expression Predicate(this IQueryable source, ParameterExpression parameterExpression, string propertyName, object constValue, FilterType filterType, FilterBehavior filterBehavior, bool isCaseSensitive, Type sourceType)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.IQueryable | source | The IQueryable source. |
System.Linq.Expressions.ParameterExpression | parameterExpression | The parameter expression. |
System.String | propertyName | The property name. |
System.Object | constValue | The object. |
FilterType | filterType | The filter type. |
FilterBehavior | filterBehavior | The filter behavior. |
System.Boolean | isCaseSensitive | A boolean values indicating whether to consider the expression with case sensitive. |
System.Type | sourceType | The type of the source |
Returns
Type | Description |
---|---|
System.Linq.Expressions.Expression | A predicate expression for the given values. |
Remarks
First create a ParameterExpression using the Parameter extension function, then use the same ParameterExpression to generate the predicates.
Predicate(IQueryable, ParameterExpression, String, Object, FilterType, FilterBehavior, Boolean, Type, Delegate, Type)
Generates a predicate expression for the given values.
Declaration
public static Expression Predicate(this IQueryable source, ParameterExpression parameterExpression, string propertyName, object constValue, FilterType filterType, FilterBehavior filterBehavior, bool isCaseSensitive, Type sourceType, Delegate expressionFunc, Type memberType = null)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.IQueryable | source | The IQueryable source. |
System.Linq.Expressions.ParameterExpression | parameterExpression | The parameter expression. |
System.String | propertyName | The property name. |
System.Object | constValue | The object. |
FilterType | filterType | The filter type. |
FilterBehavior | filterBehavior | The filter behavior. |
System.Boolean | isCaseSensitive | A boolean values indicating whether to consider the expression with case sensitive. |
System.Type | sourceType | The type of the source. |
System.Delegate | expressionFunc | The expression func. |
System.Type | memberType | The member type. |
Returns
Type | Description |
---|---|
System.Linq.Expressions.Expression | A predicate expression for the given values. |
Predicate(IQueryable, ParameterExpression, String, Object, FilterType, FilterBehavior, Boolean, Type, String)
Generates a predicate expression for the given values.
Declaration
public static Expression Predicate(this IQueryable source, ParameterExpression parameterExpression, string propertyName, object constValue, FilterType filterType, FilterBehavior filterBehavior, bool isCaseSensitive, Type sourceType, string format)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.IQueryable | source | The IQueryable source. |
System.Linq.Expressions.ParameterExpression | parameterExpression | The parameter expression. |
System.String | propertyName | The property name. |
System.Object | constValue | The object. |
FilterType | filterType | The filter type. |
FilterBehavior | filterBehavior | The filter behavior. |
System.Boolean | isCaseSensitive | A boolean values indicating whether to consider the expression with case sensitive. |
System.Type | sourceType | The type of the source |
System.String | format | The format. |
Returns
Type | Description |
---|---|
System.Linq.Expressions.Expression | A predicate expression for the given values. |
Predicate(IQueryable, ParameterExpression, String, Object, Type, FilterType, FilterBehavior, Boolean, Type, Delegate)
Generates a predicate expression for the given values.
Declaration
public static Expression Predicate(this IQueryable source, ParameterExpression parameterExpression, string propertyName, object constValue, Type memberType, FilterType filterType, FilterBehavior filterBehavior, bool isCaseSensitive, Type sourceType, Delegate expressionFunc)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.IQueryable | source | The IQueryable source. |
System.Linq.Expressions.ParameterExpression | parameterExpression | The parameter expression. |
System.String | propertyName | The property name. |
System.Object | constValue | The object. |
System.Type | memberType | The member type. |
FilterType | filterType | The filter type. |
FilterBehavior | filterBehavior | The filter behavior. |
System.Boolean | isCaseSensitive | A boolean values indicating whether to consider the expression with case sensitive. |
System.Type | sourceType | The type of the source |
System.Delegate | expressionFunc | The expression func. |
Returns
Type | Description |
---|---|
System.Linq.Expressions.Expression | A predicate binary expression for the given values. |
Select(IQueryable, IEnumerable<String>)
Generates a Select query based on the given source and the properties passed.
Declaration
public static IQueryable Select(this IQueryable source, IEnumerable<string> properties)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.IQueryable | source | The IQueryable source. |
System.Collections.Generic.IEnumerable<System.String> | properties | The enumerable collection of properties. |
Returns
Type | Description |
---|---|
System.Linq.IQueryable | A Select query based on the given source and the properties passed. |
Select(IQueryable, IEnumerable<String>, Type)
Generates a Select query based on the source and the properties passed.
It returns a dynamic class generated through ReflectionEmit, Use reflection to identify the properties and values.
Declaration
public static IQueryable Select(this IQueryable source, IEnumerable<string> properties, Type sourceType)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.IQueryable | source | The IQueryable source. |
System.Collections.Generic.IEnumerable<System.String> | properties | The enumerable collection of properties. |
System.Type | sourceType | The type of the source. |
Returns
Type | Description |
---|---|
System.Linq.IQueryable | A Select query based on the source and the properties passed. |
Select(IQueryable, String)
Generates a Select query for the given source and property.
Declaration
public static IQueryable Select(this IQueryable source, string propertyName)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.IQueryable | source | The IQueryable source. |
System.String | propertyName | The property name for which the query is generated. |
Returns
Type | Description |
---|---|
System.Linq.IQueryable | A Select query for the given source and property. |
Select(IQueryable, String, Type)
Generates a Select query based on the given source and property.
Declaration
public static IQueryable Select(this IQueryable source, string propertyName, Type sourceType)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.IQueryable | source | The IQueryable source. |
System.String | propertyName | The property name for which the query is generated. |
System.Type | sourceType | The source type. |
Returns
Type | Description |
---|---|
System.Linq.IQueryable | A Select query based on the given source and property. |
Select(IQueryable, String[])
Generates a Select query based on the given source and properties passed.
DataClasses1DataContext db = new DataClasses1DataContext();
var orders = db.Orders.Skip(0).Take(10).ToList();
var queryable = orders.AsQueryable();
var selector = queryable.Select(new string[]{"OrderID", "ShipCountry"});
Declaration
public static IQueryable Select(this IQueryable source, params string[] properties)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.IQueryable | source | The IQueryable source. |
System.String[] | properties | The array of properties based on which the query is to be generated. |
Returns
Type | Description |
---|---|
System.Linq.IQueryable | The select query based on the given source and properties passed. |
Skip(IQueryable, Int32)
Generates a SKIP expression for the given IQueryable source and the constant value.
Declaration
public static IQueryable Skip(this IQueryable source, int constValue)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.IQueryable | source | The IQueryable source. |
System.Int32 | constValue | The constant value. |
Returns
Type | Description |
---|---|
System.Linq.IQueryable | A SKIP expression for the given IQueryable source and the constant value. |
Skip(IQueryable, Int32, Type)
Generates a SKIP expression for the given IQueryable source.
Declaration
public static IQueryable Skip(this IQueryable source, int constValue, Type sourceType)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.IQueryable | source | The IQueryable source. |
System.Int32 | constValue | The constant value. |
System.Type | sourceType | The type of the source. |
Returns
Type | Description |
---|---|
System.Linq.IQueryable | A SKIP expression for the given IQueryable source. |
Sum(IQueryable, String)
Calculates the result by executing the expression obtained from the queryable sum method based on the given source and property name.
Declaration
public static object Sum(this IQueryable source, string propertyName)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.IQueryable | source | The IQueryable source. |
System.String | propertyName | The property name. |
Returns
Type | Description |
---|---|
System.Object | The result by executing the expression obtained from the queryable sum method based on the given source and property name. |
Sum(IQueryable, String, Expression<Func<String, Object, Object>>)
Calculates the result by executing the expression obtained from the queryable sum method based on the given source, property and the expression func.
Declaration
public static object Sum(this IQueryable source, string propertyName, Expression<Func<string, object, object>> expressionFunc)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.IQueryable | source | The IQueryable source. |
System.String | propertyName | The property name. |
System.Linq.Expressions.Expression<System.Func<System.String, System.Object, System.Object>> | expressionFunc | The expression func. |
Returns
Type | Description |
---|---|
System.Object | The result by executing the expression obtained from the queryable sum method based on the given source, property and the expression func. |
Sum(IQueryable, String, Type)
Calculates the result by executing the expression obtained from the queryable sum method based on the given source type and property name.
Declaration
public static object Sum(this IQueryable source, string propertyName, Type sourceType)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.IQueryable | source | The IQueryable source. |
System.String | propertyName | The property name. |
System.Type | sourceType | The type of the source. |
Returns
Type | Description |
---|---|
System.Object | The result by executing the expression obtained from the queryable sum method based on the given source type and property name. |
Take(IQueryable, Int32)
Generates a TAKE expression for the given IQueryable source and the constant value.
Declaration
public static IQueryable Take(this IQueryable source, int constValue)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.IQueryable | source | The IQueryable source. |
System.Int32 | constValue | The constant value. |
Returns
Type | Description |
---|---|
System.Linq.IQueryable | A TAKE expression for the given IQueryable source and the constant value. |
Take(IQueryable, Int32, Type)
Generates a TAKE expression in the IQueryable source for the given source and constant value.
Declaration
public static IQueryable Take(this IQueryable source, int constValue, Type sourceType)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.IQueryable | source | The IQueryable source. |
System.Int32 | constValue | The constant value. |
System.Type | sourceType | The type of the source. |
Returns
Type | Description |
---|---|
System.Linq.IQueryable | A TAKE expression in the IQueryable source for the given source and constant value. |
ThenBy(IQueryable, ParameterExpression, Expression)
Generates a ThenBy query expression for the given source and the expressions.
Declaration
public static IQueryable ThenBy(this IQueryable source, ParameterExpression parameterExpression, Expression expression)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.IQueryable | source | The IQueryable source. |
System.Linq.Expressions.ParameterExpression | parameterExpression | The parameter expression. |
System.Linq.Expressions.Expression | expression | The expression. |
Returns
Type | Description |
---|---|
System.Linq.IQueryable | A ThenBy query expression for the given source and the expressions. |
ThenBy(IQueryable, String)
Generates a ThenBy query expression for the given queryable source and property name.
Declaration
public static IQueryable ThenBy(this IQueryable source, string propertyName)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.IQueryable | source | The IQueryable source. |
System.String | propertyName | The property name. |
Returns
Type | Description |
---|---|
System.Linq.IQueryable | A ThenBy query expression for the queryable source and property name. |
ThenBy(IQueryable, String, IComparer<Object>, Expression<Func<String, Object, Object>>)
Generates a ThenBy query expression for the given values.
Declaration
public static IQueryable ThenBy(this IQueryable source, string propertyName, IComparer<object> comparer, Expression<Func<string, object, object>> expressionFunc)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.IQueryable | source | The IQueryable source. |
System.String | propertyName | The property name. |
System.Collections.Generic.IComparer<System.Object> | comparer | The comparer. |
System.Linq.Expressions.Expression<System.Func<System.String, System.Object, System.Object>> | expressionFunc | The expression func. |
Returns
Type | Description |
---|---|
System.Linq.IQueryable | A ThenBy query expression for the given values. |
ThenBy(IQueryable, String, IComparer<Object>, Type)
Generates an ThenBy query expression for the given values.
Declaration
public static IQueryable ThenBy(this IQueryable source, string propertyName, IComparer<object> comparer, Type sourceType)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.IQueryable | source | The IQueryable source. |
System.String | propertyName | The property name. |
System.Collections.Generic.IComparer<System.Object> | comparer | The comparer. |
System.Type | sourceType | The type of the source. |
Returns
Type | Description |
---|---|
System.Linq.IQueryable | An ThenBy query expression for the given values. |
ThenBy(IQueryable, String, Expression<Func<String, Object, Object>>)
Generates a ThenBy query expression for the given source, property and the expression func.
Declaration
public static IQueryable ThenBy(this IQueryable source, string propertyName, Expression<Func<string, object, object>> expressionFunc)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.IQueryable | source | The IQueryable source. |
System.String | propertyName | The property name. |
System.Linq.Expressions.Expression<System.Func<System.String, System.Object, System.Object>> | expressionFunc | The expression func. |
Returns
Type | Description |
---|---|
System.Linq.IQueryable | A ThenBy query expression for the given source, property and the expression func. |
ThenBy(IQueryable, String, Type)
Generates a ThenBy query expression for the given queryable source, its property name and the type of source.
Declaration
public static IQueryable ThenBy(this IQueryable source, string propertyName, Type sourceType)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.IQueryable | source | The source. |
System.String | propertyName | The property name. |
System.Type | sourceType | The source type. |
Returns
Type | Description |
---|---|
System.Linq.IQueryable | A ThenBy query expression for the queryable source, its property name and the type of source. |
ThenBy<T>(IQueryable, IComparer<T>)
Generates an ThenBy query expression for the given source and the comparer for the given type.
Declaration
public static IQueryable ThenBy<T>(this IQueryable source, IComparer<T> comparer)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.IQueryable | source | The IQueryable source. |
System.Collections.Generic.IComparer<T> | comparer | The comparer. |
Returns
Type | Description |
---|---|
System.Linq.IQueryable | An ThenBy query expression for the given source and the comparer for the given type. |
Type Parameters
Name | Description |
---|---|
T | The type parameter. |
ThenBy<T>(IQueryable, IComparer<T>, Type)
Generates an ThenBy query expression of the given type parameter for the given comparer and the source.
Declaration
public static IQueryable ThenBy<T>(this IQueryable source, IComparer<T> comparer, Type sourceType)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.IQueryable | source | The IQueryable source. |
System.Collections.Generic.IComparer<T> | comparer | The comparer defined. |
System.Type | sourceType | The type of the source. |
Returns
Type | Description |
---|---|
System.Linq.IQueryable | An ThenBy query expression of the given type parameter for the given comparer and the source. |
Type Parameters
Name | Description |
---|---|
T | The type parameter for which the query is to be generated. |
ThenByDescending(IQueryable, ParameterExpression, Expression)
Generates a ThenByDescending query expression for the given source and the expressions.
Declaration
public static IQueryable ThenByDescending(this IQueryable source, ParameterExpression parameterExpression, Expression expression)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.IQueryable | source | The IQueryable source. |
System.Linq.Expressions.ParameterExpression | parameterExpression | The parameter expression. |
System.Linq.Expressions.Expression | expression | The expression. |
Returns
Type | Description |
---|---|
System.Linq.IQueryable | A ThenByDescending query expression for the given source and the expressions. |
ThenByDescending(IQueryable, String)
Generates a ThenByDescending query for the given source and the property.
Declaration
public static IQueryable ThenByDescending(this IQueryable source, string propertyName)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.IQueryable | source | The IQueryable source |
System.String | propertyName | The property name. |
Returns
Type | Description |
---|---|
System.Linq.IQueryable | A ThenByDescending query for the given source and the property. |
ThenByDescending(IQueryable, String, IComparer<Object>, Expression<Func<String, Object, Object>>)
Generates a ThenByDescending query expression for the given values.
Declaration
public static IQueryable ThenByDescending(this IQueryable source, string propertyName, IComparer<object> comparer, Expression<Func<string, object, object>> expressionFunc)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.IQueryable | source | The IQueryable source. |
System.String | propertyName | The property name. |
System.Collections.Generic.IComparer<System.Object> | comparer | The comparer. |
System.Linq.Expressions.Expression<System.Func<System.String, System.Object, System.Object>> | expressionFunc | The expression func. |
Returns
Type | Description |
---|---|
System.Linq.IQueryable | A ThenByDescending query expression for the given values. |
ThenByDescending(IQueryable, String, IComparer<Object>, Type)
Generates an ThenByDescending query expression for the given values.
Declaration
public static IQueryable ThenByDescending(this IQueryable source, string propertyName, IComparer<object> comparer, Type sourceType)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.IQueryable | source | The IQueryable source. |
System.String | propertyName | The property name. |
System.Collections.Generic.IComparer<System.Object> | comparer | The comparer. |
System.Type | sourceType | The type of the source. |
Returns
Type | Description |
---|---|
System.Linq.IQueryable | An ThenByDescending query expression for the given values. |
ThenByDescending(IQueryable, String, Expression<Func<String, Object, Object>>)
Generates a ThenByDescending query expression for the given values.
Declaration
public static IQueryable ThenByDescending(this IQueryable source, string propertyName, Expression<Func<string, object, object>> expressionFunc)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.IQueryable | source | The IQueryable source. |
System.String | propertyName | The property name. |
System.Linq.Expressions.Expression<System.Func<System.String, System.Object, System.Object>> | expressionFunc | The expression func. |
Returns
Type | Description |
---|---|
System.Linq.IQueryable | A ThenByDescending query expression for the given values. |
ThenByDescending(IQueryable, String, Type)
Generates a ThenByDescending query for the given values.
Declaration
public static IQueryable ThenByDescending(this IQueryable source, string propertyName, Type sourceType)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.IQueryable | source | The IQueryable source |
System.String | propertyName | The property name. |
System.Type | sourceType | The source type. |
Returns
Type | Description |
---|---|
System.Linq.IQueryable | A ThenByDescending query for the given values. |
ThenByDescending<T>(IQueryable, IComparer<T>)
Generates an ThenByDescending query expression for the given source and the comparer for the given type.
Declaration
public static IQueryable ThenByDescending<T>(this IQueryable source, IComparer<T> comparer)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.IQueryable | source | The IQueryable source. |
System.Collections.Generic.IComparer<T> | comparer | The comparer. |
Returns
Type | Description |
---|---|
System.Linq.IQueryable | An ThenByDescending query expression for the given source and the comparer for the given type. |
Type Parameters
Name | Description |
---|---|
T | The type parameter. |
ThenByDescending<T>(IQueryable, IComparer<T>, Type)
Generates a ThenByDescending query of the given type parameter for the given source and the comparer defined.
Declaration
public static IQueryable ThenByDescending<T>(this IQueryable source, IComparer<T> comparer, Type sourceType)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.IQueryable | source | The IQueryable source. |
System.Collections.Generic.IComparer<T> | comparer | The comparer. |
System.Type | sourceType | The source type. |
Returns
Type | Description |
---|---|
System.Linq.IQueryable | A ThenByDescending query of the given type parameter for the given source and the comparer defined. |
Type Parameters
Name | Description |
---|---|
T | The type parameter. |
ToQueryable(IList)
Converts the System.Collections.IList object to System.Linq.IQueryable list
Declaration
public static IQueryable ToQueryable(this IList list)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.IList | list | The list, it represents the item source for the sfpicker |
Returns
Type | Description |
---|---|
System.Linq.IQueryable | Returns the queryable list of the given list. |
Where(IQueryable, ParameterExpression, Expression)
Generates the Where query expression based on the given values.
Use this function to generate WHERE expression based on Predicates. The AndPredicate and OrPredicate should be used in combination to build the predicate expression which is finally passed on to this function for creating a Lambda.
Declaration
public static IQueryable Where(this IQueryable source, ParameterExpression parameterExpression, Expression predicateExpression)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.IQueryable | source | The IQueryable source. |
System.Linq.Expressions.ParameterExpression | parameterExpression | The parameter expression. |
System.Linq.Expressions.Expression | predicateExpression | The predicate expression. |
Returns
Type | Description |
---|---|
System.Linq.IQueryable | The Where query expression based on the given values. |
Where(IQueryable, String, Object, FilterType, Boolean)
Generates the where expression for the given values.
Declaration
public static IQueryable Where(this IQueryable source, string propertyName, object value, FilterType filterType, bool isCaseSensitive)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.IQueryable | source | The IQueryable source. |
System.String | propertyName | The name of the property. |
System.Object | value | The object. |
FilterType | filterType | The filter type. |
System.Boolean | isCaseSensitive | A boolean value indicating whether the expression should be considered as case sensitive or not. |
Returns
Type | Description |
---|---|
System.Linq.IQueryable | The where expression for the given values. |
Where(IQueryable, String, Object, FilterType, Boolean, Type)
Generates the where expression for the given values.
Declaration
public static IQueryable Where(this IQueryable source, string propertyName, object value, FilterType filterType, bool isCaseSensitive, Type sourceType)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.IQueryable | source | The IQueryable source. |
System.String | propertyName | The name of the property. |
System.Object | value | The object. |
FilterType | filterType | The filter type. |
System.Boolean | isCaseSensitive | A boolean value indicating whether the expression should be considered as case sensitive or not. |
System.Type | sourceType | The type of the source. |
Returns
Type | Description |
---|---|
System.Linq.IQueryable | The where expression for the given values. |