Click or drag to resize

QueryableExtensionMethodsForDTOsOptionalWhereT 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 a where clause conditionally: if it's null, no call to Where is appended, otherwise a call to Where 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.10.0.0 (5.10.0)
Syntax
public static IQueryable<T> OptionalWhere<T>(
	this IQueryable<T> source,
	Expression<Func<T, bool>> whereClause
)

Parameters

source
Type: System.LinqIQueryableT
whereClause
Type: System.Linq.ExpressionsExpressionFuncT, 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