EdmFunctions.Max Method (DbExpression)

 

Creates a DbFunctionExpression that invokes the canonical 'Max' function over the specified collection. The result type of the expression is the same as the element type of the collection.

Namespace:   System.Data.Entity.Core.Common.CommandTrees.ExpressionBuilder
Assembly:  EntityFramework (in EntityFramework.dll)

public static DbFunctionExpression Max(
	this DbExpression collection
)

Parameters

collection
Type: System.Data.Entity.Core.Common.CommandTrees.DbExpression

An expression that specifies the collection from which the maximum value should be retrieved.

Return Value

Type: System.Data.Entity.Core.Common.CommandTrees.DbFunctionExpression

A new DbFunctionExpression that produces the maximum value.

Exception Condition
ArgumentNullException

collection is null.

ArgumentException

No overload of the canonical 'Max' function accepts an argument with the result type of collection.