include AnswerVariants when getting questions by surveyid

This commit is contained in:
Вячеслав 2025-04-20 19:38:39 +05:00
parent ab331a32d9
commit 8124cfe758

View file

@ -44,6 +44,6 @@ public class QuestionRepository : IQuestionRepository
public async Task<IEnumerable<QuestionBase>> GetQuestionsBySurveyId(int surveyId)
{
return await _context.Questions.Where(q => q.SurveyId == surveyId).ToListAsync();
return await _context.Questions.Include(q => q.AnswerVariants).Where(q => q.SurveyId == surveyId).ToListAsync();
}
}