private async void DeleteButton_Click(object sender, RoutedEventArgs e) { using (var store = new MyCouchStore("http://*****:*****@localhost:5984", "tv-series")) { //Delete a document using user given ID await store.DeleteAsync(SearchIDTxt.Text); SearchIDTxt.Clear(); ReadTxt.Clear(); SearchIDTxt.IsEnabled = true; MessageBox.Show("Document Successfully Deleted", "TV-Series", MessageBoxButton.OK, MessageBoxImage.Exclamation); } // Refreshes the number of tv-serie documents when one is removed. using (var client = new MyCouchClient("http://*****:*****@localhost:5984", "tv-series")) { var personQuery = new QueryViewRequest("series", "CountNoTvSeries").Configure(query2 => query2 .Reduce(false)); ViewQueryResponse result2 = await client.Views.QueryAsync(personQuery); NoTvSeriesTxt.Text = result2.RowCount.ToString(); } }
public async void DeleteObject(string _id, string _rev) { using (var db = new MyCouchStore("http://localhost:5984", "cars")) { var response = await db.DeleteAsync(_id, _rev); } }
public async Task <DeleteContractCommandContext> Execute(DeleteContractCommandContext commandContext) { using (var store = new MyCouchStore("http://*****:*****@cm-ylng-msk-03:5984", "cmas")) { await store.DeleteAsync(commandContext.id); return(commandContext); } }
/// <summary> /// Returns false if object not found. /// </summary> /// <param name="id"></param> /// <returns></returns> public async Task <bool> DeleteComment(string id) { var success = await _commentStore.DeleteAsync(id); if (success) { _commentCache.Remove(id); } return(success); }
public void Remove(LeadType type) { _store.DeleteAsync(type.DocumentId).Wait(); }
public void Remove(Lead lead) { _store.DeleteAsync(lead.DocumentId).Wait(); }
public void Remove(Product product) { _store.DeleteAsync(product.DocumentId).Wait(); }