Exemple #1
0
 /// <summary>
 /// Maximizes the target field from the database table in an asynchronous way.
 /// </summary>
 /// <param name="field">The field to be maximumd.</param>
 /// <param name="where">The query expression to be used.</param>
 /// <param name="hints">The table hints to be used. See <see cref="SqlServerTableHints"/> class.</param>
 /// <param name="transaction">The transaction to be used.</param>
 /// <returns>The maximum value.</returns>
 public Task <object> MaxAsync(Expression <Func <TEntity, object> > field,
                               QueryGroup where           = null,
                               string hints               = null,
                               IDbTransaction transaction = null)
 {
     return(DbRepository.MaxAsync <TEntity>(field: field,
                                            where : where,
                                            hints: hints,
                                            transaction: transaction));
 }
Exemple #2
0
 /// <summary>
 /// Computes the max value of the target field in an asynchronous way.
 /// </summary>
 /// <param name="field">The field to be maximized.</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 max value of the target field.</returns>
 public Task <TResult> MaxAsync <TResult>(Expression <Func <TEntity, TResult> > field,
                                          IEnumerable <QueryField> where = null,
                                          string hints = null,
                                          IDbTransaction transaction = null)
 {
     return(DbRepository.MaxAsync <TEntity, TResult>(field: field,
                                                     where : where,
                                                     hints: hints,
                                                     transaction: transaction));
 }
Exemple #3
0
 /// <summary>
 /// Maximizes the target field from the database table in an asynchronous way.
 /// </summary>
 /// <param name="field">The field to be maximumd.</param>
 /// <param name="where">The query expression to be used.</param>
 /// <param name="hints">The table hints to be used. See <see cref="SqlServerTableHints"/> class.</param>
 /// <param name="transaction">The transaction to be used.</param>
 /// <returns>The maximum value.</returns>
 public Task <object> MaxAsync(Field field,
                               IEnumerable <QueryField> where = null,
                               string hints = null,
                               IDbTransaction transaction = null)
 {
     return(DbRepository.MaxAsync <TEntity>(field: field,
                                            where : where,
                                            hints: hints,
                                            transaction: transaction));
 }
Exemple #4
0
 /// <summary>
 /// Computes the max value of the target field in an asynchronous way.
 /// </summary>
 /// <param name="field">The field to be maximized.</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 max value of the target field.</returns>
 public Task <TResult> MaxAsync <TResult>(Field field,
                                          QueryGroup where           = null,
                                          string hints               = null,
                                          IDbTransaction transaction = null)
 {
     return(DbRepository.MaxAsync <TEntity, TResult>(field: field,
                                                     where : where,
                                                     hints: hints,
                                                     transaction: transaction));
 }
Exemple #5
0
 /// <summary>
 /// Computes the max value of the target field in an asynchronous way.
 /// </summary>
 /// <param name="field">The field to be maximized.</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 max value of the target field.</returns>
 public Task <TResult> MaxAsync <TResult>(Expression <Func <TEntity, TResult> > field,
                                          QueryGroup where                    = null,
                                          string hints                        = null,
                                          IDbTransaction transaction          = null,
                                          CancellationToken cancellationToken = default)
 {
     return(DbRepository.MaxAsync <TEntity, TResult>(field: field,
                                                     where : where,
                                                     hints: hints,
                                                     transaction: transaction,
                                                     cancellationToken: cancellationToken));
 }
Exemple #6
0
 /// <summary>
 /// Computes the max value of the target field in an asynchronous way.
 /// </summary>
 /// <param name="field">The field to be maximized.</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 max value of the target field.</returns>
 public Task <TResult> MaxAsync <TResult>(Field field,
                                          IEnumerable <QueryField> where = null,
                                          string hints = null,
                                          IDbTransaction transaction          = null,
                                          CancellationToken cancellationToken = default)
 {
     return(DbRepository.MaxAsync <TEntity, TResult>(field: field,
                                                     where : where,
                                                     hints: hints,
                                                     transaction: transaction,
                                                     cancellationToken: cancellationToken));
 }
Exemple #7
0
 /// <summary>
 /// Computes the max value of the target field in an asynchronous way.
 /// </summary>
 /// <param name="field">The field to be maximized.</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 max value of the target field.</returns>
 public Task <object> MaxAsync(Expression <Func <TEntity, object> > field,
                               Expression <Func <TEntity, bool> > where = null,
                               string hints = null,
                               IDbTransaction transaction          = null,
                               CancellationToken cancellationToken = default)
 {
     return(DbRepository.MaxAsync <TEntity>(field: field,
                                            where : where,
                                            hints: hints,
                                            transaction: transaction,
                                            cancellationToken: cancellationToken));
 }
Exemple #8
0
 /// <summary>
 /// Computes the max value of the target field in an asynchronous way.
 /// </summary>
 /// <param name="field">The field to be maximized.</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 max value of the target field.</returns>
 public Task <object> MaxAsync(Field field,
                               QueryGroup where                    = null,
                               string hints                        = null,
                               IDbTransaction transaction          = null,
                               CancellationToken cancellationToken = default)
 {
     return(DbRepository.MaxAsync <TEntity>(field: field,
                                            where : where,
                                            hints: hints,
                                            transaction: transaction,
                                            cancellationToken: cancellationToken));
 }