minor repositories changes
This commit is contained in:
parent
845db13c63
commit
3e570decd7
2 changed files with 6 additions and 1 deletions
|
|
@ -4,5 +4,5 @@ namespace SurveyLib.Core.Repositories;
|
|||
|
||||
public interface IQuestionRepository : IGenericRepository<QuestionBase>
|
||||
{
|
||||
|
||||
public IEnumerable<QuestionBase> GetQuestionsBySurveyId(int surveyId);
|
||||
}
|
||||
|
|
@ -41,4 +41,9 @@ public class QuestionRepository : IQuestionRepository
|
|||
_context.Questions.Remove(entity);
|
||||
await _context.SaveChangesAsync();
|
||||
}
|
||||
|
||||
public IEnumerable<QuestionBase> GetQuestionsBySurveyId(int surveyId)
|
||||
{
|
||||
return _context.Questions.Where(q => q.SurveyId == surveyId);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue