public async void RemoveTodoItem_Click()
        {
            if (_selectedDeleteTodoItem != null)
            {
                await TodoItemRepository.Delete(_selectedDeleteTodoItem);

                _selectedDeleteTodoItem = null;
            }
        }
        public async Task Delete_Should_CallDelete()
        {
            // Arrange
            var guid = Guid.NewGuid();

            _repositoryMock.Setup(x => x.Delete(It.IsAny <Guid>())).Returns(Task.CompletedTask);

            // Act
            await _repository.Delete(guid);

            // Assert
            _repositoryMock.Verify(x => x.Delete(guid), Times.Once());
            _repositoryMock.VerifyNoOtherCalls();
        }
        public async void DeleteTodoItemButton_Click()
        {
            var dialog = new ContentDialog
            {
                Title               = "Confirmação",
                Content             = "Você confirma a exclusão desse registro? Essa operação não poderá ser desfeita.",
                PrimaryButtonText   = "Sim",
                SecondaryButtonText = "Não"
            };

            dialog.PrimaryButtonClick += async(s, e) =>
            {
                if (TodoItem.Appointment != null && TodoItem.Appointment.Id > 0)
                {
                    //TODO:Delete Appointment
                }

                await TodoItemRepository.Delete(TodoItem);

                NavigationService.GoBack();
            };

            await dialog.ShowAsync();
        }
 public void Delete(int id)
 {
     _repo.Delete(x => x.Id.Equals(id));
 }