Пример #1
0
        public async Task <DeletedTestQuestionDto> DeleteQuestion(int questionId)
        {
            TestQuestion testQuestion = await testQuestionRepository.GetByIdAsync(questionId);

            if (testQuestion == null)
            {
                return(null);
            }

            testQuestionRepository.Delete(testQuestion);
            await unitOfWork.SaveAsync();

            return(mapper.Map <DeletedTestQuestionDto>(testQuestion));
        }
Пример #2
0
 // ---------------------------------------------------------------------------------------------
 public void DeleteQuestion(int id)
 {
     _questionRepository.Delete(id);
 }