public async Task InsertOrReplaceAsync(IOperationToHashMatch match) { var entity = OperationToHashMatchEntity.Create(match); var historyEntity = OperationToHashMatchHistoryEntity.Create(match); if (match.TransactionHash != null) { var entityReverse = HashToOperationMatchEntity.Create(match); await _tableReverse.InsertOrReplaceAsync(entityReverse); } else { await _tableReverse.DeleteIfExistAsync(HashToOperationMatchEntity.GetPartitionKey(), match.TransactionHash); } await _table.InsertOrReplaceAsync(entity); await _tableHistory.InsertOrReplaceAsync(historyEntity); }
public async Task InsertOrReplaceHistoricalAsync(IOperationToHashMatch match) { var historyEntity = OperationToHashMatchHistoryEntity.Create(match); await _tableHistory.InsertOrReplaceAsync(historyEntity); }