added basic services

This commit is contained in:
Вячеслав 2025-04-16 18:04:55 +05:00
parent 3e570decd7
commit 6e8d6cebdd
6 changed files with 100 additions and 12 deletions

View file

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