예제 #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
파일: Delete.cs 프로젝트: softempire/RepoDb
 /// <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));
 }