as no tracking get methods
This commit is contained in:
parent
0ee41aebef
commit
8790e7c7cf
6 changed files with 27 additions and 1 deletions
|
|
@ -19,6 +19,11 @@ public class CompletionRepository : ICompletionRepository
|
|||
return await _context.Completions.Include(c => c.Answers).FirstOrDefaultAsync(c => c.Id == id);
|
||||
}
|
||||
|
||||
public async Task<Completion?> GetByIdAsNoTrackingAsync(int id)
|
||||
{
|
||||
return await _context.Completions.AsNoTracking().FirstOrDefaultAsync(c => c.Id == id);
|
||||
}
|
||||
|
||||
public async Task<IEnumerable<Completion>> GetAllAsync()
|
||||
{
|
||||
return await _context.Completions.ToListAsync();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue