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 <IOperationToHashMatch> GetByHashAsync(string transactionHash) { var entity = await _tableReverse.GetDataAsync(HashToOperationMatchEntity.GetPartitionKey(), transactionHash); return(entity); }