Пример #1
0
 /// <summary>
 /// Delete the rows from the table in an asynchronous way.
 /// </summary>
 /// <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 number of rows that has been deleted from the table.</returns>
 public Task <int> DeleteAsync(QueryGroup where,
                               string hints = null,
                               IDbTransaction transaction = null)
 {
     return(DbRepository.DeleteAsync <TEntity>(where : where,
                                               hints: hints,
                                               transaction: transaction));
 }
Пример #2
0
 /// <summary>
 /// Delete the rows from the table in an asynchronous way.
 /// </summary>
 /// <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 number of rows that has been deleted from the table.</returns>
 public Task <int> DeleteAsync(Expression <Func <TEntity, bool> > where,
                               string hints = null,
                               IDbTransaction transaction = null)
 {
     return(DbRepository.DeleteAsync <TEntity>(where : where,
                                               hints: hints,
                                               transaction: transaction));
 }
Пример #3
0
 /// <summary>
 /// Delete the rows from the table in an asynchronous way.
 /// </summary>
 /// <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 number of rows that has been deleted from the table.</returns>
 public Task <int> DeleteAsync(IEnumerable <QueryField> where,
                               string hints = null,
                               IDbTransaction transaction = null)
 {
     return(DbRepository.DeleteAsync <TEntity>(where : where,
                                               hints: hints,
                                               transaction: transaction));
 }
Пример #4
0
 /// <summary>
 /// Deletes an existing row from the table in an asynchronous way.
 /// </summary>
 /// <param name="entity">The data entity object 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> DeleteAsync(TEntity entity,
                               string hints = null,
                               IDbTransaction transaction = null)
 {
     return(DbRepository.DeleteAsync <TEntity>(entity: entity,
                                               hints: hints,
                                               transaction: transaction));
 }
Пример #5
0
 /// <summary>
 /// Delete the rows from the table in an asynchronous way.
 /// </summary>
 /// <param name="whereOrPrimaryKey">The dynamic expression or the primary/identity key value 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 number of rows that has been deleted from the table.</returns>
 public Task <int> DeleteAsync(object whereOrPrimaryKey,
                               string hints = null,
                               IDbTransaction transaction = null)
 {
     return(DbRepository.DeleteAsync <TEntity>(whereOrPrimaryKey: whereOrPrimaryKey,
                                               hints: hints,
                                               transaction: transaction));
 }
Пример #6
0
 /// <summary>
 /// Delete the rows from the table in an asynchronous way.
 /// </summary>
 /// <typeparam name="TWhat">The type of the expression or the key value.</typeparam>
 /// <param name="what">The dynamic expression or the key value 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 number of rows that has been deleted from the table.</returns>
 public Task <int> DeleteAsync <TWhat>(TWhat what,
                                       string hints = null,
                                       IDbTransaction transaction = null)
 {
     return(DbRepository.DeleteAsync <TEntity, TWhat>(what: what,
                                                      hints: hints,
                                                      transaction: transaction));
 }
Пример #7
0
 /// <summary>
 /// Delete the rows from the table in an asynchronous way.
 /// </summary>
 /// <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 number of rows that has been deleted from the table.</returns>
 public Task <int> DeleteAsync(QueryGroup where,
                               string hints = null,
                               IDbTransaction transaction          = null,
                               CancellationToken cancellationToken = default)
 {
     return(DbRepository.DeleteAsync <TEntity>(where : where,
                                               hints: hints,
                                               transaction: transaction,
                                               cancellationToken: cancellationToken));
 }
Пример #8
0
 /// <summary>
 /// Delete the rows from the table in an asynchronous way.
 /// </summary>
 /// <typeparam name="TWhat">The type of the expression or the key value.</typeparam>
 /// <param name="what">The dynamic expression or the key value 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 number of rows that has been deleted from the table.</returns>
 public Task <int> DeleteAsync <TWhat>(TWhat what,
                                       string hints = null,
                                       IDbTransaction transaction          = null,
                                       CancellationToken cancellationToken = default)
 {
     return(DbRepository.DeleteAsync <TEntity, TWhat>(what: what,
                                                      hints: hints,
                                                      transaction: transaction,
                                                      cancellationToken: cancellationToken));
 }
Пример #9
0
 /// <summary>
 /// Deletes an existing row from the table in an asynchronous way.
 /// </summary>
 /// <param name="entity">The data entity object 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> DeleteAsync(TEntity entity,
                               string hints = null,
                               IDbTransaction transaction          = null,
                               CancellationToken cancellationToken = default)
 {
     return(DbRepository.DeleteAsync <TEntity>(entity: entity,
                                               hints: hints,
                                               transaction: transaction,
                                               cancellationToken: cancellationToken));
 }
Пример #10
0
 /// <summary>
 /// Deletes an existing data from the database in an asynchronous way.
 /// </summary>
 /// <param name="where">The query expression 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> DeleteAsync(QueryField where,
                               IDbTransaction transaction = null)
 {
     return(DbRepository.DeleteAsync <TEntity>(where : where,
                                               transaction: transaction));
 }