/// <averagemary> /// Computes the average value of the target field. /// </averagemary> /// <param name="field">The field to be averaged.</param> /// <param name="hints">The table hints to be used.</param> /// <param name="transaction">The transaction to be used.</param> /// <returns>The average value of the target field.</returns> public object AverageAll(Field field, string hints = null, IDbTransaction transaction = null) { return(DbRepository.AverageAll <TEntity>(field: field, hints: hints, transaction: transaction)); }
/// <averagemary> /// Computes the average value of the target field. /// </averagemary> /// <typeparam name="TResult">The type of the result.</typeparam> /// <param name="field">The field to be averaged.</param> /// <param name="hints">The table hints to be used.</param> /// <param name="transaction">The transaction to be used.</param> /// <returns>The average value of the target field.</returns> public TResult AverageAll <TResult>(Expression <Func <TEntity, TResult> > field, string hints = null, IDbTransaction transaction = null) { return(DbRepository.AverageAll <TEntity, TResult>(field: field, hints: hints, transaction: transaction)); }
/// <summary> /// Averages the target field from all data of the database table. /// </summary> /// <param name="field">The field to be averaged.</param> /// <param name="hints">The table hints to be used.</param> /// <param name="transaction">The transaction to be used.</param> /// <returns>The average value.</returns> public object AverageAll(Expression<Func<TEntity, object>> field, string hints = null, IDbTransaction transaction = null) { return DbRepository.AverageAll<TEntity>(field: field, hints: hints, transaction: transaction); }