Exemple #1
0
 public async Task Delete(string address)
 {
     if (!await _storage.DeleteIfExistAsync(ObservableWalletEntity.GeneratePartitionKey(address), ObservableWalletEntity.GenerateRowKey(address)))
     {
         throw new BusinessException($"Wallet {address} not exist", ErrorCode.EntityNotExist);
     }
 }
Exemple #2
0
 public async Task Insert(IObservableWallet wallet)
 {
     if (!await _storage.TryInsertAsync(ObservableWalletEntity.Create(wallet)))
     {
         throw new BusinessException($"Wallet {wallet.Address} already exist", ErrorCode.EntityAlreadyExist);
     }
 }
Exemple #3
0
 public async Task <IObservableWallet> Get(string address)
 {
     return(await _storage.GetDataAsync(ObservableWalletEntity.GeneratePartitionKey(address), ObservableWalletEntity.GenerateRowKey(address)));
 }