Exemple #1
0
        public ActionResult DeleteQuestionAnswer(int id)
        {
            var model = _faqRepository.Get(id);

            if (model != null)
            {
                _questionAnswerRepository.Delete(model.Id);
            }
            return(null);
        }
Exemple #2
0
        public async Task DeleteAnswerAsync_AnswerIsPreviouslySeeded_DeleteAnswer()
        {
            QuestionAnswer deleted;

            using (var uow = unitOfWorkProvider.Create())
            {
                repository.Delete(Initializer.AnswerJavaEeRedHat.Id);
                await uow.Commit();

                deleted = await repository.GetAsync(Initializer.AnswerJavaEeRedHat.Id);
            }

            Assert.Null(deleted);
        }