Example #1
0
 /// <summary>
 /// Updates existing multiple data in the database.
 /// </summary>
 /// <param name="entities">The list of data entity objects to be used for update.</param>
 /// <param name="batchSize">The batch size of the update operation.</param>
 /// <param name="transaction">The transaction to be used.</param>
 /// <returns>The number of rows affected by the execution.</returns>
 public int UpdateAll(IEnumerable <TEntity> entities,
                      int batchSize = Constant.DefaultBatchOperationSize,
                      IDbTransaction transaction = null)
 {
     return(DbRepository.UpdateAll <TEntity>(entities: entities,
                                             batchSize: batchSize,
                                             transaction: transaction));
 }
Example #2
0
 /// <summary>
 /// Update the existing multiple rows in the table.
 /// </summary>
 /// <param name="entities">The list of entity objects to be used for update.</param>
 /// <param name="qualifiers">The expression for the qualifier fields.</param>
 /// <param name="batchSize">The batch size of the update operation.</param>
 /// <param name="hints">The table hints to be used.</param>
 /// <param name="transaction">The transaction to be used.</param>
 /// <returns>The number of affected rows during the update process.</returns>
 public int UpdateAll(IEnumerable <TEntity> entities,
                      Expression <Func <TEntity, object> > qualifiers,
                      int batchSize = Constant.DefaultBatchOperationSize,
                      string hints  = null,
                      IDbTransaction transaction = null)
 {
     return(DbRepository.UpdateAll <TEntity>(entities: entities,
                                             qualifiers: qualifiers,
                                             batchSize: batchSize,
                                             hints: hints,
                                             transaction: transaction));
 }
Example #3
0
 /// <summary>
 /// Update the existing rows in the table.
 /// </summary>
 /// <param name="entities">The list of data entity objects to be used for update.</param>
 /// <param name="batchSize">The batch size of the update operation.</param>
 /// <param name="fields">The mapping list of <see cref="Field"/> objects 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 affected rows during the update process.</returns>
 public int UpdateAll(IEnumerable <TEntity> entities,
                      int batchSize = Constant.DefaultBatchOperationSize,
                      IEnumerable <Field> fields = null,
                      string hints = null,
                      IDbTransaction transaction = null)
 {
     return(DbRepository.UpdateAll <TEntity>(entities: entities,
                                             batchSize: batchSize,
                                             fields: fields,
                                             hints: hints,
                                             transaction: transaction));
 }