static TableOperation MakeDeleteOperation(Key key, string versionToDelete) { key = KeyEncode(key); var entity = AzureTableEntity.KeyOnly(key); entity.ETag = versionToDelete; return(TableOperation.Delete(entity)); }
public async Task <bool?> Delete(Key key) { CheckKey(key); key = KeyEncode(key); var entity = AzureTableEntity.KeyOnly(key); try { await this.table.ExecuteAsync(TableOperation.Delete(entity)).ConfigureAwait(false); return(true); } catch (StorageException e) when(e.RequestInformation.HttpStatusCode == (int)HttpStatusCode.NotFound) { return(false); } }