Exemplo n.º 1
0
 /// <summary>
 /// Delete the rows from the table in an asynchronous way.
 /// </summary>
 /// <param name="entities">The list of data entity objects to be deleted.</param>
 /// <param name="hints">The table hints to be used.</param>
 /// <param name="transaction">The transaction to be used.</param>
 /// <returns>The number of rows that has been deleted from the table.</returns>
 public Task <int> DeleteAllAsync(IEnumerable <TEntity> entities,
                                  string hints = null,
                                  IDbTransaction transaction = null)
 {
     return(DbRepository.DeleteAllAsync <TEntity>(entities: entities,
                                                  hints: hints,
                                                  transaction: transaction));
 }
Exemplo n.º 2
0
 /// <summary>
 /// Delete all the 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>The number of rows that has been deleted from the table.</returns>
 public Task <int> DeleteAllAsync(string hints = null,
                                  IDbTransaction transaction          = null,
                                  CancellationToken cancellationToken = default)
 {
     return(DbRepository.DeleteAllAsync <TEntity>(hints: hints,
                                                  transaction: transaction,
                                                  cancellationToken: cancellationToken));
 }
Exemplo n.º 3
0
 /// <summary>
 /// Delete the rows from the table in an asynchronous way.
 /// </summary>
 /// <typeparam name="TKey">The type of the key column.</typeparam>
 /// <param name="keys">The list of the keys to be deleted.</param>
 /// <param name="hints">The table hints to be used.</param>
 /// <param name="transaction">The transaction to be used.</param>
 /// <returns>The number of rows that has been deleted from the table.</returns>
 public Task <int> DeleteAllAsync <TKey>(IEnumerable <TKey> keys,
                                         string hints = null,
                                         IDbTransaction transaction = null)
 {
     return(DbRepository.DeleteAllAsync <TEntity, TKey>(keys: keys,
                                                        hints: hints,
                                                        transaction: transaction));
 }
Exemplo n.º 4
0
 /// <summary>
 /// Deletes all the target existing data from the database. It uses the <see cref="DbConnectionExtension.Delete{TEntity}(IDbConnection, QueryGroup, string, int?, IDbTransaction, ITrace, IStatementBuilder)"/> operation as the underlying operation.
 /// </summary>
 /// <param name="primaryKeys">The list of the primary keys to be deleted.</param>
 /// <param name="hints">The table hints to be used.</param>
 /// <param name="transaction">The transaction to be used.</param>
 /// <returns>The number of rows affected by the execution.</returns>
 public Task <int> DeleteAllAsync(IEnumerable <object> primaryKeys,
                                  string hints = null,
                                  IDbTransaction transaction = null)
 {
     return(DbRepository.DeleteAllAsync <TEntity>(primaryKeys: primaryKeys,
                                                  hints: hints,
                                                  transaction: transaction));
 }
Exemplo n.º 5
0
 /// <summary>
 /// Delete the rows from the table in an asynchronous way.
 /// </summary>
 /// <param name="keys">The list of the keys to be deleted.</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 number of rows that has been deleted from the table.</returns>
 public Task <int> DeleteAllAsync(IEnumerable <object> keys,
                                  string hints = null,
                                  IDbTransaction transaction          = null,
                                  CancellationToken cancellationToken = default)
 {
     return(DbRepository.DeleteAllAsync <TEntity>(keys: keys,
                                                  hints: hints,
                                                  transaction: transaction,
                                                  cancellationToken: cancellationToken));
 }
Exemplo n.º 6
0
 /// <summary>
 /// Delete the rows from the table in an asynchronous way.
 /// </summary>
 /// <param name="tableName">The name of the target table.</param>
 /// <param name="keys">The list of the primary keys to be deleted.</param>
 /// <param name="hints">The table hints to be used.</param>
 /// <param name="transaction">The transaction to be used.</param>
 /// <returns>The number of rows that has been deleted from the table.</returns>
 public Task <int> DeleteAllAsync(string tableName,
                                  IEnumerable <object> keys,
                                  string hints = null,
                                  IDbTransaction transaction = null)
 {
     return(DbRepository.DeleteAllAsync <TEntity>(tableName: tableName,
                                                  keys: keys,
                                                  hints: hints,
                                                  transaction: transaction));
 }
Exemplo n.º 7
0
 /// <summary>
 /// Delete all the 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>
 /// <returns>The number of rows that has been deleted from the table.</returns>
 public Task <int> DeleteAllAsync(string hints = null,
                                  IDbTransaction transaction = null)
 {
     return(DbRepository.DeleteAllAsync <TEntity>());
 }