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 SurveyRepository : ISurveyRepository
|
|||
return await _context.Surveys.FindAsync(id);
|
||||
}
|
||||
|
||||
public async Task<Survey?> GetByIdAsNoTrackingAsync(int id)
|
||||
{
|
||||
return await _context.Surveys.AsNoTracking().FirstOrDefaultAsync(c => c.Id == id);
|
||||
}
|
||||
|
||||
public async Task<IEnumerable<Survey>> GetAllAsync()
|
||||
{
|
||||
return await _context.Surveys.ToListAsync();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue