Base solution for your next web application
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)