public IActionResult Delete(Guid questionGroupId)
        {
            // запоминаем состояние до обновления
            var preImage = _QuestionGroupRepository.Retrieve(questionGroupId);

            _QuestionGroupRepository.Delete(questionGroupId);

            if (preImage.QuestId.HasValue && preImage.QuestId.Value != Guid.Empty)
            {
                UpdateIndexes(preImage.QuestId.Value);
            }

            return(Ok(ServiceResponse.Ok()));
        }
 public QuestionGroup DeleteQuestionGroup(int id)
 {
     _questionRepository.DeleteMulti(x => x.QuestionGroupID == id);
     _answerRepository.DeleteMulti(x => x.QuestionGroupID == id);
     return(_quesGroupRepository.Delete(id));
 }