/// <summary> /// Executa ação definida para o registro no objeto de destino /// </summary> /// <param name="rowOp">Operação que deverás er executada</param> /// <param name="transformedRow">Linha que foi transformada</param> public void ProcessTransformedRow(RowOperation rowOp, DictionaryRow transformedRow) { if (this.RowBeforeProcess != null) { this.RowBeforeProcess(transformedRow, rowOp); } try { switch (rowOp) { case RowOperation.Process: _dest.Process(transformedRow); break; case RowOperation.Insert: _dest.Insert(transformedRow); break; case RowOperation.Update: _dest.Update(transformedRow); break; case RowOperation.Delete: _dest.Delete(transformedRow); break; } if (this.RowSuccess != null && rowOp != RowOperation.Ignore) { this.RowSuccess(transformedRow, rowOp); } } catch (Exception exRow) { if (this.RowError != null) { this.RowError(transformedRow, rowOp, exRow); } else { throw exRow; } } if (this.RowAfterProcess != null) { this.RowAfterProcess(transformedRow, rowOp); } }
/// <summary> /// 更新一条数据 /// </summary> public void Update(TravelAgent.Model.Destination model) { DestDAL.Update(model); }
private async Task UpdateUser(IDestination destination, UserDestinationModel userDestination) { await destination.Update(userDestination); _logger.LogInformation($"{destination.GetType().Name}: User with name of '{userDestination.FullName}' was updated"); }