Beispiel #1
0
 /// <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));
 }
Beispiel #2
0
 /// <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));
 }
Beispiel #3
0
 /// <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));
 }
Beispiel #4
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="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));
 }
Beispiel #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));
 }
Beispiel #6
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="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));
 }
Beispiel #7
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="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));
 }
Beispiel #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));
 }
Beispiel #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));
 }
Beispiel #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));
 }
Beispiel #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));
 }
Beispiel #12
0
 /// <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));
 }