As no tracking (ARCH201)
Key dotnet.ef.as-no-tracking · Severity warning · Category ef
For read-only queries EF Core still tracks entities for change detection, wasting memory and CPU.
Incorrect
Section titled “Incorrect”var users = await _db.Users .Where(u => u.IsActive) .ToListAsync();return users;Correct
Section titled “Correct”var users = await _db.Users .AsNoTracking() .Where(u => u.IsActive) .ToListAsync();return users;Add AsNoTracking() to queries whose results you will not modify.