public async Task <bool> RemoveAsync(string key) { CloudTable table = PersistedGrantTable; PersistedGrantTblEntity keyEntity = await GetEntityTableAsync <PersistedGrantTblEntity>(key, PersistedGrantTable); if (keyEntity != null) { var entities = keyEntity.ToModel().ToEntities(); await Task.WhenAll(GetAndDeleteTableEntityByKeysAsync(entities.subjectGrant.PartitionKey, entities.subjectGrant.RowKey, PersistedGrantTable), table.ExecuteAsync(TableOperation.Delete(keyEntity)), DeleteBlobAsync(key, PersistedGrantBlobContainer)).ConfigureAwait(false); return(true); } return(false); }
public static PersistedGrant ToModel(this PersistedGrantTblEntity entity) { return(KeyMapper.Map <PersistedGrant>(entity)); }