Esempio n. 1
0
 /// <summary>
 /// Updates an existing data in the database based on the given query expression.
 /// </summary>
 /// <param name="entity">The data entity object to be updated.</param>
 /// <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 int Update(TEntity entity,
                   QueryGroup where,
                   IDbTransaction transaction = null)
 {
     return(DbRepository.Update <TEntity>(entity: entity,
                                          where : where,
                                          transaction: transaction));
 }
Esempio n. 2
0
 /// <summary>
 /// Updates an existing data in the database.
 /// </summary>
 /// <param name="entity">The data entity object to be updated.</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 int Update(TEntity entity,
                   string hints = null,
                   IDbTransaction transaction = null)
 {
     return(DbRepository.Update <TEntity>(entity: entity,
                                          hints: hints,
                                          transaction: transaction));
 }
Esempio n. 3
0
 /// <summary>
 /// Updates an existing data in the database based on the given query expression.
 /// </summary>
 /// <param name="entity">The data entity object to be updated.</param>
 /// <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 int Update(TEntity entity,
                   Expression <Func <TEntity, bool> > where,
                   IDbTransaction transaction = null)
 {
     return(DbRepository.Update <TEntity>(entity: entity,
                                          where : where,
                                          transaction: transaction));
 }
Esempio n. 4
0
 /// <summary>
 /// Updates an existing data in the database based on the given query expression.
 /// </summary>
 /// <param name="entity">The data entity object to be updated.</param>
 /// <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 int Update(TEntity entity,
                   IEnumerable <QueryField> where,
                   IDbTransaction transaction = null)
 {
     return(DbRepository.Update <TEntity>(entity: entity,
                                          where : where,
                                          transaction: transaction));
 }
Esempio n. 5
0
 /// <summary>
 /// Updates an existing data in the database based on the given query expression.
 /// </summary>
 /// <param name="entity">The data entity object to be updated.</param>
 /// <param name="whereOrPrimaryKey">The dynamic expression or the primary key value to be used.</param>
 /// <param name="transaction">The transaction to be used.</param>
 /// <returns>The number of rows affected by the execution.</returns>
 public int Update(TEntity entity,
                   object whereOrPrimaryKey,
                   IDbTransaction transaction = null)
 {
     return(DbRepository.Update <TEntity>(entity: entity,
                                          whereOrPrimaryKey: whereOrPrimaryKey,
                                          transaction: transaction));
 }
Esempio n. 6
0
 /// <summary>
 /// Updates an existing row in the table.
 /// </summary>
 /// <param name="entity">The data entity object to be updated.</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 Update(TEntity entity,
                   IEnumerable <Field> fields = null,
                   string hints = null,
                   IDbTransaction transaction = null)
 {
     return(DbRepository.Update <TEntity>(entity: entity,
                                          fields: fields,
                                          hints: hints,
                                          transaction: transaction));
 }
Esempio n. 7
0
 /// <summary>
 /// Updates an existing row in the table based on the given query expression.
 /// </summary>
 /// <param name="entity">The data entity object to be updated.</param>
 /// <param name="where">The query expression to be used.</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 Update(TEntity entity,
                   Expression <Func <TEntity, bool> > where,
                   IEnumerable <Field> fields = null,
                   string hints = null,
                   IDbTransaction transaction = null)
 {
     return(DbRepository.Update <TEntity>(entity: entity,
                                          where : where,
                                          fields: fields,
                                          hints: hints,
                                          transaction: transaction));
 }
Esempio n. 8
0
 /// <summary>
 /// Updates an existing row in the table based on the given query expression.
 /// </summary>
 /// <param name="tableName">The name of the target table to be used.</param>
 /// <param name="entity">The data entity object to be updated.</param>
 /// <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 affected rows during the update process..</returns>
 public int Update(string tableName,
                   TEntity entity,
                   QueryField where,
                   string hints = null,
                   IDbTransaction transaction = null)
 {
     return(DbRepository.Update <TEntity>(tableName: tableName,
                                          entity: entity,
                                          where : where,
                                          hints: hints,
                                          transaction: transaction));
 }
Esempio n. 9
0
 /// <summary>
 /// Updates an existing row in the table based on the given query expression.
 /// </summary>
 /// <param name="tableName">The name of the target table to be used.</param>
 /// <param name="entity">The data entity object to be updated.</param>
 /// <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 affected rows during the update process..</returns>
 public int Update(string tableName,
                   TEntity entity,
                   Expression <Func <TEntity, bool> > where,
                   string hints = null,
                   IDbTransaction transaction = null)
 {
     return(DbRepository.Update <TEntity>(tableName: tableName,
                                          entity: entity,
                                          where : where,
                                          hints: hints,
                                          transaction: transaction));
 }
Esempio n. 10
0
 /// <summary>
 /// Updates an existing row in the table based on the given query expression.
 /// </summary>
 /// <param name="tableName">The name of the target table to be used.</param>
 /// <param name="entity">The data entity object to be updated.</param>
 /// <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 affected rows during the update process..</returns>
 public int Update(string tableName,
                   TEntity entity,
                   object whereOrPrimaryKey,
                   string hints = null,
                   IDbTransaction transaction = null)
 {
     return(DbRepository.Update <TEntity>(tableName: tableName,
                                          entity: entity,
                                          whereOrPrimaryKey: whereOrPrimaryKey,
                                          hints: hints,
                                          transaction: transaction));
 }
Esempio n. 11
0
 /// <summary>
 /// Updates an existing data in the database.
 /// </summary>
 /// <param name="entity">The data entity object to be updated.</param>
 /// <param name="transaction">The transaction to be used.</param>
 /// <returns>The number of rows affected by the execution.</returns>
 public int Update(TEntity entity,
                   IDbTransaction transaction = null)
 {
     return(DbRepository.Update <TEntity>(entity: entity,
                                          transaction: transaction));
 }