Appearance
MaxAsync Method
Definition
- Namespace:
JASE.Database - Assembly:
JASE.Database.dll
Overloads
| Name | Description |
|---|---|
Task<Nullable<decimal>> MaxAsync(Expression<Func<T, object>> property, bool distinct = null, IPredicateNode predicate = null, CancellationToken cancellationToken = null) | Computes the maximum value of the specified property for rows matching the optional predicate. |
Task<TResult> MaxAsync(Expression<Func<T, TResult>> property, bool distinct = null, IPredicateNode predicate = null, CancellationToken cancellationToken = null) | Computes the maximum value of the specified property for rows matching the optional predicate. |
Task<Nullable<decimal>> MaxAsync(Expression<Func<T, object>> property, bool distinct = null, IPredicateNode predicate = null, CancellationToken cancellationToken = null)
csharp
Task<Nullable<decimal>> MaxAsync(Expression<Func<T, object>> property, bool distinct = null, IPredicateNode predicate = null, CancellationToken cancellationToken = null)Computes the maximum value of the specified property for rows matching the optional predicate.
Type parameters
| Name | Description |
|---|---|
T | The entity (row) type. |
Parameters
| Name | Description |
|---|---|
ct | Cancellation token. |
distinct | If true, computes over distinct values. |
predicate | Optional predicate to filter rows. |
property | Property selector to aggregate. |
Returns
The computed maximum, or null if no rows match.
Task<TResult> MaxAsync(Expression<Func<T, TResult>> property, bool distinct = null, IPredicateNode predicate = null, CancellationToken cancellationToken = null)
csharp
Task<TResult> MaxAsync(Expression<Func<T, TResult>> property, bool distinct = null, IPredicateNode predicate = null, CancellationToken cancellationToken = null)Computes the maximum value of the specified property for rows matching the optional predicate.
Type parameters
| Name | Description |
|---|---|
T | The entity (row) type. |
TResult | The projected property type. |
Parameters
| Name | Description |
|---|---|
ct | Cancellation token. |
distinct | If true, computes over distinct values. |
predicate | Optional predicate to filter rows. |
property | Property selector to aggregate. |
Returns
The computed maximum, or default if no rows match (provider-dependent for nullable types).