예제 #1
0
파일: Average.cs 프로젝트: onuromer/RepoDb
 /// <summary>
 /// Computes the average value of the target field in an asynchronous way.
 /// </summary>
 /// <param name="field">The field to be averaged.</param>
 /// <param name="where">The query expression to be used.</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 Task <object> AverageAsync(Expression <Func <TEntity, object> > field,
                                   QueryGroup where           = null,
                                   string hints               = null,
                                   IDbTransaction transaction = null)
 {
     return(DbRepository.AverageAsync <TEntity>(field: field,
                                                where : where,
                                                hints: hints,
                                                transaction: transaction));
 }
예제 #2
0
 /// <averagemary>
 /// Computes the average value of the target field in an asynchronous way.
 /// </averagemary>
 /// <param name="field">The field to be averaged.</param>
 /// <param name="where">The query expression to be used.</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 Task <TResult> AverageAsync <TResult>(Expression <Func <TEntity, TResult> > field,
                                              IEnumerable <QueryField> where = null,
                                              string hints = null,
                                              IDbTransaction transaction = null)
 {
     return(DbRepository.AverageAsync <TEntity, TResult>(field: field,
                                                         where : where,
                                                         hints: hints,
                                                         transaction: transaction));
 }
예제 #3
0
파일: Average.cs 프로젝트: onuromer/RepoDb
 /// <summary>
 /// Computes the average value of the target field in an asynchronous way.
 /// </summary>
 /// <param name="field">The field to be averaged.</param>
 /// <param name="where">The query expression to be used.</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 Task <object> AverageAsync(Field field,
                                   IEnumerable <QueryField> where = null,
                                   string hints = null,
                                   IDbTransaction transaction = null)
 {
     return(DbRepository.AverageAsync <TEntity>(field: field,
                                                where : where,
                                                hints: hints,
                                                transaction: transaction));
 }
예제 #4
0
 /// <averagemary>
 /// Computes the average value of the target field in an asynchronous way.
 /// </averagemary>
 /// <param name="field">The field to be averaged.</param>
 /// <param name="where">The query expression to be used.</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 Task <TResult> AverageAsync <TResult>(Field field,
                                              QueryGroup where           = null,
                                              string hints               = null,
                                              IDbTransaction transaction = null)
 {
     return(DbRepository.AverageAsync <TEntity, TResult>(field: field,
                                                         where : where,
                                                         hints: hints,
                                                         transaction: transaction));
 }
예제 #5
0
 /// <averagemary>
 /// Computes the average value of the target field in an asynchronous way.
 /// </averagemary>
 /// <param name="field">The field to be averaged.</param>
 /// <param name="where">The query expression to be used.</param>
 /// <param name="hints">The table hints to be used.</param>
 /// <param name="transaction">The transaction to be used.</param>
 /// <param name="cancellationToken">The <see cref="CancellationToken"/> object to be used during the asynchronous operation.</param>
 /// <returns>The average value of the target field.</returns>
 public Task <TResult> AverageAsync <TResult>(Expression <Func <TEntity, TResult> > field,
                                              QueryGroup where                    = null,
                                              string hints                        = null,
                                              IDbTransaction transaction          = null,
                                              CancellationToken cancellationToken = default)
 {
     return(DbRepository.AverageAsync <TEntity, TResult>(field: field,
                                                         where : where,
                                                         hints: hints,
                                                         transaction: transaction,
                                                         cancellationToken: cancellationToken));
 }
예제 #6
0
 /// <averagemary>
 /// Computes the average value of the target field in an asynchronous way.
 /// </averagemary>
 /// <param name="field">The field to be averaged.</param>
 /// <param name="where">The query expression to be used.</param>
 /// <param name="hints">The table hints to be used.</param>
 /// <param name="transaction">The transaction to be used.</param>
 /// <param name="cancellationToken">The <see cref="CancellationToken"/> object to be used during the asynchronous operation.</param>
 /// <returns>The average value of the target field.</returns>
 public Task <TResult> AverageAsync <TResult>(Field field,
                                              IEnumerable <QueryField> where = null,
                                              string hints = null,
                                              IDbTransaction transaction          = null,
                                              CancellationToken cancellationToken = default)
 {
     return(DbRepository.AverageAsync <TEntity, TResult>(field: field,
                                                         where : where,
                                                         hints: hints,
                                                         transaction: transaction,
                                                         cancellationToken: cancellationToken));
 }
예제 #7
0
 /// <averagemary>
 /// Computes the average value of the target field in an asynchronous way.
 /// </averagemary>
 /// <param name="field">The field to be averaged.</param>
 /// <param name="where">The query expression to be used.</param>
 /// <param name="hints">The table hints to be used.</param>
 /// <param name="transaction">The transaction to be used.</param>
 /// <param name="cancellationToken">The <see cref="CancellationToken"/> object to be used during the asynchronous operation.</param>
 /// <returns>The average value of the target field.</returns>
 public Task <object> AverageAsync(Expression <Func <TEntity, object> > field,
                                   Expression <Func <TEntity, bool> > where = null,
                                   string hints = null,
                                   IDbTransaction transaction          = null,
                                   CancellationToken cancellationToken = default)
 {
     return(DbRepository.AverageAsync <TEntity>(field: field,
                                                where : where,
                                                hints: hints,
                                                transaction: transaction,
                                                cancellationToken: cancellationToken));
 }
예제 #8
0
 /// <averagemary>
 /// Computes the average value of the target field in an asynchronous way.
 /// </averagemary>
 /// <param name="field">The field to be averaged.</param>
 /// <param name="where">The query expression to be used.</param>
 /// <param name="hints">The table hints to be used.</param>
 /// <param name="transaction">The transaction to be used.</param>
 /// <param name="cancellationToken">The <see cref="CancellationToken"/> object to be used during the asynchronous operation.</param>
 /// <returns>The average value of the target field.</returns>
 public Task <object> AverageAsync(Field field,
                                   QueryGroup where                    = null,
                                   string hints                        = null,
                                   IDbTransaction transaction          = null,
                                   CancellationToken cancellationToken = default)
 {
     return(DbRepository.AverageAsync <TEntity>(field: field,
                                                where : where,
                                                hints: hints,
                                                transaction: transaction,
                                                cancellationToken: cancellationToken));
 }