Appearance
AverageAsync Method
Definition
- Namespace:
JASE.Database - Assembly:
JASE.Database.dll
Task<Nullable<decimal>> AverageAsync(Expression<Func<T, object>> property, bool distinct = null, IPredicateNode predicate = null, CancellationToken ct = null)
csharp
Task<Nullable<decimal>> AverageAsync(Expression<Func<T, object>> property, bool distinct = null, IPredicateNode predicate = null, CancellationToken ct = null)Computes the average 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, averages over distinct values. |
predicate | Optional predicate to filter rows. |
property | Property selector to aggregate. |
Returns
The computed average, or null if no rows match.