Пример #1
0
        public async Task WriteAssetsOwnersDataAsync(IAssetsOwners assetOwnersData)
        {
            var key   = Guid.NewGuid().ToString();
            var bytes = assetOwnersData.ToJson().ToUtf8ByteArray();
            await _azureBlob.SaveBlobAsync(BlobContainer, key, bytes);

            await _tableStorage.InsertOrReplaceAsync(AssetsOwnersEntity.CreateNew(assetOwnersData, key));
        }
Пример #2
0
 public static AssetsOwnersEntity CreateNew(IAssetsOwners assetsOwners, string blobId)
 {
     return(new AssetsOwnersEntity
     {
         RowKey = GenerateRowKey(assetsOwners.AssetId),
         PartitionKey = GeneratePartiteonKey(),
         BlobId = blobId,
         BlockHeight = assetsOwners.BlockHeight
     });
 }