public async Task <IAsset> GetAssetAsync(string id) { var partitionKey = AssetEntity.GeneratePartitionKey(); var rowKey = AssetEntity.GenerateRowKey(id); return(await _tableStorage.GetDataAsync(partitionKey, rowKey)); }
public async Task SetDisabled(string id, bool value) { await _tableStorage.ReplaceAsync(AssetEntity.GeneratePartitionKey(), AssetEntity.GenerateRowKey(id), assetEntity => { assetEntity.IsDisabled = value; return(assetEntity); }); }
public async Task EditAssetAsync(string id, IAsset asset) { await _tableStorage.DeleteAsync(AssetEntity.GeneratePartitionKey(), AssetEntity.GenerateRowKey(id)); await RegisterAssetAsync(asset); }