public async Task DeleteDocumentAsync(Document document) { var allDocuments = await _documentsRepository.GetDocumentsAsync(); var documentsToUpdate = GetInsertionAffectedDocuments(allDocuments, document.Position, allDocuments.Length).ToArray(); await _documentsRepository.DeleteDocumentAsync(document.Id, documentsToUpdate); await _contentStorage.DeleteFile(Path.GetFileName(document.Location)); }
public async Task DeleteDocument(int documentId) { await _documentsRepository.DeleteDocumentAsync(documentId).ConfigureAwait(false); await _unitOfWork.SaveChangesAsync().ConfigureAwait(false); }