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 <IEnumerable <IAsset> > GetAssetsAsync() { var partitionKey = AssetEntity.GeneratePartitionKey(); return(await _tableStorage.GetDataAsync(partitionKey)); }
public async Task EditAssetAsync(string id, IAsset asset) { await _tableStorage.DeleteAsync(AssetEntity.GeneratePartitionKey(), AssetEntity.GenerateRowKey(id)); await RegisterAssetAsync(asset); }
public async Task <IEnumerable <IAsset> > GetBitcoinAssets() { return(await _storage.GetDataAsync(AssetEntity.GeneratePartitionKey(), entity => entity.Blockchain == "Bitcoin")); }
public async Task <IAsset> GetAssetById(string id) { return(await _storage.GetDataAsync(AssetEntity.GeneratePartitionKey(), id)); }
public async Task <IEnumerable <IAsset> > GetAssetsForCategoryAsync(string category) { var partitionKey = AssetEntity.GeneratePartitionKey(); return(await _tableStorage.GetDataAsync(partitionKey, x => x.CategoryId == category)); }