public Task <bool> UpdateBalanceAsync(string walletId, IWallet wallet, long updateSequenceNumber) { var entity = WalletEntity.Create(walletId, wallet, updateSequenceNumber); return(_tableStorage.InsertOrReplaceAsync(entity, x => x.UpdateSequenceNumber == null || x.UpdateSequenceNumber.Value < updateSequenceNumber)); }
public async Task <IWallet> GetAsync(string walletId, string assetId) { return(await _tableStorage.GetDataAsync(WalletEntity.GeneratePartitionKey(walletId), WalletEntity.GenerateRowKey(assetId))); }
public async Task <IEnumerable <IWallet> > GetAsync(string walletId) { return(await _tableStorage.GetDataAsync(WalletEntity.GeneratePartitionKey(walletId))); }