public async Task RemoveAsync(string key) { Guard.ForNull(key, nameof(key)); var sql = $"SELECT* FROM c where c.key = \"{key}\""; var entity = (await _persistedGrantCosmosStore.QuerySingleAsync(sql, feedOptions: new Microsoft.Azure.Documents.Client.FeedOptions { PartitionKey = new Microsoft.Azure.Documents.PartitionKey(key) })); if (entity == null) { return; } await _persistedGrantCosmosStore.RemoveByIdAsync(entity.Id, entity.Key); }
public async Task DeleteByIdAsync(Guid id) { var removeResult = await _cosmosStore.RemoveByIdAsync(id.ToString()); if (!removeResult.IsSuccess) { throw removeResult.Exception; } }
public async Task <IActionResult> Delete(Guid id, CancellationToken cancellationToken) { if (id == Guid.Empty) { return(BadRequest()); } await _peopleCosmosStore.RemoveByIdAsync(id.ToString(), cancellationToken : cancellationToken); return(Ok()); }
public async Task <bool> DeleteArtist(string partitionKey) { var artist = await GetArtist(partitionKey); if (artist != null) { //Note deleting is required partitionKey await Store.RemoveByIdAsync(artist.ArtistId.ToString(), artist.PartitionKey); return(true); } return(false); }
public async Task <bool> Delete(string id) { try { await store.RemoveByIdAsync(id); return(true); } catch (Exception) { return(false); } }
public async Task <string> Handle(DeleteEbatchSheetCommand request, CancellationToken cancellationToken) { var result = await _cosmosStore.RemoveByIdAsync(request.Id, new Microsoft.Azure.Documents.Client.RequestOptions { PartitionKey = new Microsoft.Azure.Documents.PartitionKey(Constants.EBATCH_SHEET_PARTITON_KEY) }); if (result.ResourceResponse != null) { return(request.Id); } _logger.LogError("DELETE_EBATCHSHEET: EBATCHSHEET IS NOT FOUND"); throw new NotFoundException("EbatchSheet", request.Id); }
public async Task RemoveIdentityResourceAsync(string name) { Guard.ForNull(name, nameof(name)); var sql = $"SELECT* FROM c where c.name = '{name}'"; var entity = (await _identityResourceGrantCosmosStore.QuerySingleAsync(sql, feedOptions: new Microsoft.Azure.Documents.Client.FeedOptions { PartitionKey = new Microsoft.Azure.Documents.PartitionKey(name) })); if (entity == null) { return; } var response = await _identityResourceGrantCosmosStore.RemoveByIdAsync(entity.Id, entity.Name); }
public virtual async Task <IActionResult> DeleteAsync(string id) { if (string.IsNullOrEmpty(id)) { return(BadRequest()); } var response = await _cosmosStore.RemoveByIdAsync(id, _requestOptions); if (!response.IsSuccess) { _logger.LogInformation("Error deleting {nameof(T)} {id}. The status of the operation is {cosmosResponse.CosmosOperationStatus}", response.Exception); } return(new OkResult()); }
public async Task<bool> DeletePostAsync(Guid postId) { var response = await _cosmosStore.RemoveByIdAsync(postId.ToString(), postId.ToString()); return response.IsSuccess; }
public async Task <bool> DeletePostAsync(Guid postId) { var response = await _CosmosStore.RemoveByIdAsync(postId.ToString(), new Microsoft.Azure.Cosmos.PartitionKey(postId.ToString())); return(response.IsSuccess); }
public async Task DeleteFamily(string id, string partitionKey) { await store.RemoveByIdAsync(id, partitionKey); }
public async Task Remove(Guid id) { await CosmosStore.RemoveByIdAsync(id.ToString()); }
public async Task <bool> DeletePostAsync(Guid postId) { var delete = await _cosmosStore.RemoveByIdAsync(postId.ToString()); return(delete.IsSuccess); }
public async Task <bool> DeletePost(Guid postId) { var result = await _cosmosStore.RemoveByIdAsync(postId.ToString(), postId.ToString()); return(result.IsSuccess); }
public async Task DeletePlayer(string id) { await _cosmosStore.RemoveByIdAsync(id); }
public async Task <bool> DeleteByIdAsync(Guid id) { var deleted = await _cosmosStore.RemoveByIdAsync(id.ToString()); return(deleted.IsSuccess); }
public Task DeleteAsync(FlatForRentAnnouncement flatForRentAnnouncement) { return(_cosmosStore.RemoveByIdAsync(flatForRentAnnouncement.Id.ToString())); }
public async Task <bool> RemoveProject(string projectId) { var result = await _NoDb.RemoveByIdAsync(projectId, projectId); return(result.IsSuccess); }
public async Task <bool> DeleteProductAsync(Guid productID) { var response = await _cosmosStore.RemoveByIdAsync(productID.ToString(), productID.ToString()); return(response.IsSuccess); }
public async Task <bool> DeletePostAsync(string postId) { var response = await cosmosStore.RemoveByIdAsync(postId); return(response.IsSuccess); }
public async Task <bool> DeleteMessageAsync(Guid messageId) { var response = await _cosmosStore.RemoveByIdAsync(messageId.ToString(), messageId.ToString()); return(response.IsSuccess); }
public async Task <IActionResult> DeleteCar(string carId) { await _cosmosStore.RemoveByIdAsync(carId); return(RedirectToAction("Index")); }
public async Task <bool> DeleteOrderAsync(Guid orderId) { var response = await _cosmosStore.RemoveByIdAsync(orderId.ToString(), orderId.ToString()); return(response.IsSuccess); }
public async Task Delete(string id) { await _store.RemoveByIdAsync(id); }