DevForce Help Reference
Max(IEntityScalarQuery) Method
Example 


Returns the maximum value of items in the sequence.
Syntax
'Declaration
 
<ExtensionAttribute()>
Public Overloads Shared Function Max( _
   ByVal source As IEntityScalarQuery _
) As Task(Of Object)
'Usage
 
Dim source As IEntityScalarQuery
Dim value As Task(Of Object)
 
value = EntityScalarAsyncExtensions.Max(source)
[Extension()]
public static Task<object> Max( 
   IEntityScalarQuery source
)

Parameters

source
Example
public async void AsyncMax() {
  var maxFreight = await _entityManager.OrderSummaries.Select(o => o.Freight).AsScalarAsync().Max();
}
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

EntityScalarAsyncExtensions Class
EntityScalarAsyncExtensions Members
Overload List

Send Feedback