예제 #1
0
파일: Merge.cs 프로젝트: softempire/RepoDb
 /// <summary>
 /// Merges a data entity object into an existing data in the database.
 /// </summary>
 /// <typeparam name="TResult">The target type of the result.</typeparam>
 /// <param name="entity">The object to be merged.</param>
 /// <param name="transaction">The transaction to be used.</param>
 /// <returns>The value of the identity field if present, otherwise, the value of primary field.</returns>
 public TResult Merge <TResult>(TEntity entity,
                                IDbTransaction transaction = null)
 {
     return(DbRepository.Merge <TEntity, TResult>(entity: entity,
                                                  qualifier: null,
                                                  transaction: transaction));
 }
예제 #2
0
파일: Merge.cs 프로젝트: softempire/RepoDb
 /// <summary>
 /// Merges a data entity object into an existing data in the database.
 /// </summary>
 /// <typeparam name="TResult">The target type of the result.</typeparam>
 /// <param name="entity">The object to be merged.</param>
 /// <param name="qualifiers">The list of qualifer fields to be used.</param>
 /// <param name="transaction">The transaction to be used.</param>
 /// <returns>The value of the identity field if present, otherwise, the value of primary field.</returns>
 public TResult Merge <TResult>(TEntity entity,
                                IEnumerable <Field> qualifiers,
                                IDbTransaction transaction = null)
 {
     return(DbRepository.Merge <TEntity, TResult>(entity: entity,
                                                  qualifiers: qualifiers,
                                                  transaction: transaction));
 }
예제 #3
0
파일: Merge.cs 프로젝트: softempire/RepoDb
 /// <summary>
 /// Merges a data entity object into an existing data in the database.
 /// </summary>
 /// <param name="entity">The object to be merged.</param>
 /// <param name="qualifier">The qualifer field to be used during merge operation.</param>
 /// <param name="transaction">The transaction to be used.</param>
 /// <returns>The value of the identity field if present, otherwise, the value of primary field.</returns>
 public object Merge(TEntity entity,
                     Field qualifier,
                     IDbTransaction transaction = null)
 {
     return(DbRepository.Merge <TEntity>(entity: entity,
                                         qualifier: qualifier,
                                         transaction: transaction));
 }
예제 #4
0
파일: Merge.cs 프로젝트: mertkokusen/RepoDb
 /// <summary>
 /// Inserts a new row or updates an existing row in the table.
 /// </summary>
 /// <param name="entity">The object to be merged.</param>
 /// <param name="hints">The table hints to be used.</param>
 /// <param name="transaction">The transaction to be used.</param>
 /// <returns>The value of the identity field if present, otherwise, the value of the primary field.</returns>
 public object Merge(TEntity entity,
                     string hints = null,
                     IDbTransaction transaction = null)
 {
     return(DbRepository.Merge <TEntity>(entity: entity,
                                         hints: hints,
                                         transaction: transaction));
 }
예제 #5
0
 /// <summary>
 /// Inserts a new row or updates an existing row in the table.
 /// </summary>
 /// <param name="entity">The object to be merged.</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 value of the identity field if present, otherwise, the value of the primary field.</returns>
 public object Merge(TEntity entity,
                     IEnumerable <Field> fields = null,
                     string hints = null,
                     IDbTransaction transaction = null)
 {
     return(DbRepository.Merge <TEntity>(entity: entity,
                                         fields: fields,
                                         hints: hints,
                                         transaction: transaction));
 }
예제 #6
0
파일: Merge.cs 프로젝트: mertkokusen/RepoDb
 /// <summary>
 /// Inserts a new row or updates an existing row in the table.
 /// </summary>
 /// <param name="entity">The object to be merged.</param>
 /// <param name="qualifiers">The expression for the qualifer fields.</param>
 /// <param name="hints">The table hints to be used.</param>
 /// <param name="transaction">The transaction to be used.</param>
 /// <returns>The value of the identity field if present, otherwise, the value of the primary field.</returns>
 public object Merge(TEntity entity,
                     Expression <Func <TEntity, object> > qualifiers,
                     string hints = null,
                     IDbTransaction transaction = null)
 {
     return(DbRepository.Merge <TEntity>(entity: entity,
                                         qualifiers: qualifiers,
                                         hints: hints,
                                         transaction: transaction));
 }
예제 #7
0
파일: Merge.cs 프로젝트: mertkokusen/RepoDb
 /// <summary>
 /// Inserts a new row or updates an existing row in the table.
 /// </summary>
 /// <typeparam name="TResult">The target type of the result.</typeparam>
 /// <param name="entity">The object to be merged.</param>
 /// <param name="qualifier">The qualifer field to be used during merge operation.</param>
 /// <param name="hints">The table hints to be used.</param>
 /// <param name="transaction">The transaction to be used.</param>
 /// <returns>The value of the identity field if present, otherwise, the value of the primary field.</returns>
 public TResult Merge <TResult>(TEntity entity,
                                Field qualifier,
                                string hints = null,
                                IDbTransaction transaction = null)
 {
     return(DbRepository.Merge <TEntity, TResult>(entity: entity,
                                                  qualifier: qualifier,
                                                  hints: hints,
                                                  transaction: transaction));
 }
예제 #8
0
 /// <summary>
 /// Inserts a new row or updates an existing row in the table.
 /// </summary>
 /// <typeparam name="TResult">The target type of the result.</typeparam>
 /// <param name="tableName">The name of the target table to be used.</param>
 /// <param name="entity">The object to be merged.</param>
 /// <param name="hints">The table hints to be used.</param>
 /// <param name="transaction">The transaction to be used.</param>
 /// <returns>The value of the identity field if present, otherwise, the value of the primary field.</returns>
 public TResult Merge <TResult>(string tableName,
                                TEntity entity,
                                string hints = null,
                                IDbTransaction transaction = null)
 {
     return(DbRepository.Merge <TEntity, TResult>(tableName: tableName,
                                                  entity: entity,
                                                  qualifier: null,
                                                  hints: hints,
                                                  transaction: transaction));
 }
예제 #9
0
 /// <summary>
 /// Inserts a new row or updates an existing row in the table.
 /// </summary>
 /// <typeparam name="TResult">The target type of the result.</typeparam>
 /// <param name="entity">The object to be merged.</param>
 /// <param name="qualifiers">The expression for the qualifer fields.</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 value of the identity field if present, otherwise, the value of the primary field.</returns>
 public TResult Merge <TResult>(TEntity entity,
                                Expression <Func <TEntity, object> > qualifiers,
                                IEnumerable <Field> fields = null,
                                string hints = null,
                                IDbTransaction transaction = null)
 {
     return(DbRepository.Merge <TEntity, TResult>(entity: entity,
                                                  qualifiers: qualifiers,
                                                  fields: fields,
                                                  hints: hints,
                                                  transaction: transaction));
 }
예제 #10
0
 /// <summary>
 /// Inserts a new row or updates an existing row in the table.
 /// </summary>
 /// <param name="tableName">The name of the target table to be used.</param>
 /// <param name="entity">The object to be merged.</param>
 /// <param name="qualifiers">The list of qualifer fields 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 value of the identity field if present, otherwise, the value of the primary field.</returns>
 public object Merge(string tableName,
                     TEntity entity,
                     IEnumerable <Field> qualifiers,
                     string hints = null,
                     IDbTransaction transaction = null)
 {
     return(DbRepository.Merge <TEntity>(tableName: tableName,
                                         entity: entity,
                                         qualifiers: qualifiers,
                                         hints: hints,
                                         transaction: transaction));
 }
예제 #11
0
 /// <summary>
 /// Inserts a new row or updates an existing row in the table.
 /// </summary>
 /// <typeparam name="TResult">The target type of the result.</typeparam>
 /// <param name="tableName">The name of the target table to be used.</param>
 /// <param name="entity">The object to be merged.</param>
 /// <param name="qualifiers">The expression for the qualifer fields.</param>
 /// <param name="hints">The table hints to be used.</param>
 /// <param name="transaction">The transaction to be used.</param>
 /// <returns>The value of the identity field if present, otherwise, the value of the primary field.</returns>
 public TResult Merge <TResult>(string tableName,
                                TEntity entity,
                                Expression <Func <TEntity, object> > qualifiers,
                                string hints = null,
                                IDbTransaction transaction = null)
 {
     return(DbRepository.Merge <TEntity, TResult>(tableName: tableName,
                                                  entity: entity,
                                                  qualifiers: qualifiers,
                                                  hints: hints,
                                                  transaction: transaction));
 }
예제 #12
0
파일: Merge.cs 프로젝트: softempire/RepoDb
 /// <summary>
 /// Merges a data entity object into an existing data in the database.
 /// </summary>
 /// <param name="entity">The object to be merged.</param>
 /// <param name="transaction">The transaction to be used.</param>
 /// <returns>The value of the identity field if present, otherwise, the value of primary field.</returns>
 public object Merge(TEntity entity,
                     IDbTransaction transaction = null)
 {
     return(DbRepository.Merge <TEntity>(entity: entity,
                                         transaction: transaction));
 }