/// <summary> /// Count the number of rows from the table in an asynchronous way. /// </summary> /// <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>An integer value that holds the number of rows from the table.</returns> public Task <long> CountAllAsync(string hints = null, IDbTransaction transaction = null, CancellationToken cancellationToken = default) { return(DbRepository.CountAllAsync <TEntity>(hints: hints, transaction: transaction, cancellationToken: cancellationToken)); }
/// <summary> /// Counts all the data from the database in an asynchronous way. /// </summary> /// <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 number of rows affected by the execution.</returns> public Task <long> CountAllAsync(string hints = null, IDbTransaction transaction = null) { return(DbRepository.CountAllAsync <TEntity>(hints: hints, transaction: transaction)); }