overthinking repositories from scratch
This commit is contained in:
parent
58271df949
commit
845db13c63
8 changed files with 4 additions and 51 deletions
|
|
@ -41,14 +41,4 @@ public class AnswerRepository : IAnswerRepository
|
|||
_context.Answers.Remove(entity);
|
||||
await _context.SaveChangesAsync();
|
||||
}
|
||||
|
||||
public async Task<IEnumerable<Answer>> GetByAttemptIdAsync(int attemptId)
|
||||
{
|
||||
return await _context.Answers.Where(a => a.CompletionId == attemptId).ToListAsync();
|
||||
}
|
||||
|
||||
public async Task<IEnumerable<Answer>> GetByQuestionIdAsync(int questionId)
|
||||
{
|
||||
return await _context.Answers.Where(a => a.QuestionId == questionId).ToListAsync();
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue