Click or drag to resize

QueryableExtensionMethodsForDTOsOptionalOrderByT Method

Part of LLBLGen Pro's functionality to project entity queries to generated DTO classes. Don't use this method in your own code. Extension method for enumerables in DTO projections which have been converted to queryables to append an orderby clause conditionally: if it's null, no call to OrderBy is appended, otherwise a call to OrderBy with the lambda provided is appended. This is done at evaluation time, hence this method's body isn't used as the call to this method is expected to be done inside a method which builds a projection.

Namespace:  SD.LLBLGen.Pro.LinqSupportClasses.DTOProjectionHelpers
Assembly:  SD.LLBLGen.Pro.ORMSupportClasses (in SD.LLBLGen.Pro.ORMSupportClasses.dll) Version: 5.11.0.0 (5.11.23.1114)
Syntax
public static IQueryable<T> OptionalOrderBy<T>(
	this IQueryable<T> source,
	List<ValuePair<Expression, bool>> orderByClauses
)

Parameters

source
Type: System.LinqIQueryableT
orderByClauses
Type: System.Collections.GenericListValuePairExpression, Boolean

Type Parameters

T

Return Value

Type: IQueryableT

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IQueryableT. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Remarks
Part of LLBLGen Pro's functionality to project entity queries to generated DTO classes. Don't use this method in your own code.
See Also