Beispiel #1
0
 /// <summary>
 /// Truncates a table from the database in an asynchronous way.
 /// </summary>
 /// <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 number of rows affected.</returns>
 public Task <int> TruncateAsync(IDbTransaction transaction          = null,
                                 CancellationToken cancellationToken = default)
 {
     return(DbRepository.TruncateAsync <TEntity>(transaction: transaction,
                                                 cancellationToken: cancellationToken));
 }
Beispiel #2
0
 /// <summary>
 /// Truncates a table from the database in an asynchronous way.
 /// </summary>
 /// <param name="cancellationToken">The <see cref="CancellationToken"/> object to be used during the asynchronous operation.</param>
 /// <returns>The number of rows affected.</returns>
 public Task <int> TruncateAsync(CancellationToken cancellationToken = default)
 {
     return(DbRepository.TruncateAsync <TEntity>(cancellationToken: cancellationToken));
 }
Beispiel #3
0
 /// <summary>
 /// Truncates a table from the database in an asynchronous way.
 /// </summary>
 /// <param name="transaction">The transaction to be used.</param>
 /// <returns>The number of rows affected.</returns>
 public Task <int> TruncateAsync(IDbTransaction transaction = null)
 {
     return(DbRepository.TruncateAsync <TEntity>(transaction: transaction));
 }
Beispiel #4
0
 /// <summary>
 /// Truncates a table from the database in an asynchronous way.
 /// </summary>
 /// <returns>The number of rows affected.</returns>
 public Task <int> TruncateAsync()
 {
     return(DbRepository.TruncateAsync <TEntity>(transaction: null,
                                                 cancellationToken: CancellationToken.None));
 }
Beispiel #5
0
 /// <summary>
 /// Truncates a table from the database in an asynchronous way.
 /// </summary>
 /// <returns>The number of rows affected.</returns>
 public Task <int> TruncateAsync()
 {
     return(DbRepository.TruncateAsync <TEntity>());
 }