public static OutputEntity CreateNew(IOutput output) { var result = new OutputEntity { Time = output.Time, Txid = output.Txid, Value = output.Value, RowKey = GenerateRowKey(output.Addresses), PartitionKey = GeneratePartiteonKey(output.BlockHash) }; return(result); }
public async Task <IEnumerable <IOutput> > GetAsync(string hashBlock) { var partitionKey = OutputEntity.GeneratePartiteonKey(hashBlock); return(await _tableStorage.GetDataAsync(partitionKey)); }
public Task SaveAsync(IOutput output) { var newOutputs = OutputEntity.CreateNew(output); return(_tableStorage.InsertOrReplaceAsync(newOutputs)); }