a7DocumentDbStudio.ViewModel.CollectionVM.DeleteDocument C# (CSharp) Method

DeleteDocument() public method

public DeleteDocument ( DocumentModel documentModel ) : System.Threading.Tasks.Task
documentModel a7DocumentDbStudio.Model.DocumentModel
return System.Threading.Tasks.Task
        public async Task DeleteDocument(DocumentModel documentModel)
        {
            MessageBoxResult messageBoxResult = System.Windows.MessageBox.Show("Are you sure?", "Delete Confirmation", System.Windows.MessageBoxButton.YesNo);
            if (messageBoxResult == MessageBoxResult.Yes)
            {
                await this._model.DeleteDocument(documentModel);
                this.Documents.Remove(documentModel);
            }
        }