Merge branch 'unstable' into 'main'

include AnswerVariants when getting questions by surveyid

See merge request internship-2025/survey-webapp/surveylib!13
This commit is contained in:
Вячеслав 2025-04-20 14:39:01 +00:00
commit eb48f28d66

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();
}
}