Merge branch 'unstable' into 'main'
make GetCompletionById return answers included (btw maybe it's not necessary) See merge request internship-2025/survey-webapp/surveylib!17
This commit is contained in:
commit
14d0f36cb8
1 changed files with 1 additions and 1 deletions
|
|
@ -16,7 +16,7 @@ public class CompletionRepository : ICompletionRepository
|
||||||
|
|
||||||
public async Task<Completion?> GetByIdAsync(int id)
|
public async Task<Completion?> GetByIdAsync(int id)
|
||||||
{
|
{
|
||||||
return await _context.Completions.FindAsync(id);
|
return await _context.Completions.Include(c => c.Answers).FirstOrDefaultAsync(c => c.Id == id);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<IEnumerable<Completion>> GetAllAsync()
|
public async Task<IEnumerable<Completion>> GetAllAsync()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue