Click or drag to resize

PreProcessorHandleMinByMaxByMethodCall Method

Handles the method calls to q.MinBy(selector) and q.MaxBy(selector), and rewrites it to: for Min: q.OrderBy(selector).FirstOrDefault() for Max: q.OrderByDescending(selector).FirstOrDefault()

Namespace:  SD.LLBLGen.Pro.LinqSupportClasses.ExpressionHandlers
Assembly:  SD.LLBLGen.Pro.ORMSupportClasses (in SD.LLBLGen.Pro.ORMSupportClasses.dll) Version: 5.10.0.0 (5.10.0)
Syntax
protected virtual Expression HandleMinByMaxByMethodCall(
	MethodCallExpression expressionToHandle,
	AggregateFunction aggregateFunction
)

Parameters

expressionToHandle
Type: System.Linq.ExpressionsMethodCallExpression
aggregateFunction
Type: SD.LLBLGen.Pro.ORMSupportClassesAggregateFunction

Return Value

Type: Expression
See Also