diff --git a/SurveyLib.Infrastructure.EFCore/Repositories/QuestionRepository.cs b/SurveyLib.Infrastructure.EFCore/Repositories/QuestionRepository.cs index 59ca2f7..5a8b82e 100644 --- a/SurveyLib.Infrastructure.EFCore/Repositories/QuestionRepository.cs +++ b/SurveyLib.Infrastructure.EFCore/Repositories/QuestionRepository.cs @@ -44,6 +44,6 @@ public class QuestionRepository : IQuestionRepository public async Task> 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(); } } \ No newline at end of file