public async Task <bool> DeleteCustomTaskAsync(string customTaskTitle) { var customTask = await _cosmosStore.FindAsync(customTaskTitle, customTaskTitle); var response = await _cosmosStore.RemoveAsync(customTask); return(response.IsSuccess); }
public async Task <bool> DeletePost_Async(Guid postId) { var cosmoPost = await _cosmosStore.FindAsync(postId.ToString()); var response = await _cosmosStore.RemoveAsync(cosmoPost); return(response.IsSuccess); }
public async Task <bool> DeletePostAsync(Guid id) { var post = await cosmosStore.FindAsync(id.ToString()); if (post == null) { return(false); } var response = await cosmosStore.RemoveAsync(x => x.Id == post.Id.ToString()); return(response.IsSuccess); }
public async Task RemoveByExpressionRemoves() { // Arrange foreach (var i in Enumerable.Range(0, 10)) { var id = Guid.NewGuid().ToString(); var addedDummy = new Dummy { Id = id, Name = "Test " + i }; await _dummyStore.AddAsync(addedDummy); } // Act var result = await _dummyStore.RemoveAsync(x => x.Name.Contains("Test")); // Assert Assert.True(result.IsSuccess); Assert.Empty(result.FailedEntities); }
public async Task DeleteAsync(CosmosPost post) { await _cosmosStore.RemoveAsync(post); }
public async Task Delete(string cosmosID) { await _productStore.RemoveAsync(resource => resource.id == cosmosID); }
public async Task Delete(string id) { await _store.RemoveAsync(template => template.TemplateID == id); }
private async Task ClearUsers() { await _userStore.RemoveAsync(u => true); }
private async Task ClearLocations() { await _locationStore.RemoveAsync(l => true); }