Base solution for your next web application
Ends in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

AsNoTracking in GetAll() repository call. #4530


User avatar
0
sparkyjr created

I am using AsNoTracking in GetAll() repository call in the following way:

var itemsList=await _exampleRepository.GetAll()
                                      .AsNoTracking()
                                      .Where(someCondition)
                                      .Include(r=>r.Entity)
                                      .ToListAsync()

Is this the correct way to order AsNoTracking(), Where clause and Include?


1 Answer(s)