public async Task <DocumentServiceDeleteResponse> DeleteAsync(List <Document> documents) { documents.ForEach(d => d.Bytes = null); var request = new DocumentServiceDeleteRequest() { Documents = documents }; var response = await _client.DeleteAsync(request); return(response); }
public async Task <DocumentServiceDeleteResponse> DeleteAsync(DocumentServiceDeleteRequest request) { DocumentServiceDeleteResponse response = new DocumentServiceDeleteResponse(); try { await _blogStorageService.DeleteDocumentAsync(request.Documents); response.Documents = request.Documents.Select(d => d.Id).ToArray(); } catch (System.Exception ex) { response = new DocumentServiceDeleteResponse() { Error = ex.Message }; } return(response); }