Junior
From PDF
EF Core
Entity Framework Core
What is the difference between tracked and untracked queries? ● Tracked queries: EF Core tracks entities returned from the query. Changes to them
re monitored and persisted.
- Untracked queries: EF does not monitor the returned entities. Faster, read-only
ccess.
Tracked (default):
var user = context.Users.FirstOrDefault();
Untracked:
var user = context.Users.AsNoTracking().FirstOrDefault();Share this Q&A
Share preview image: https://www.toolliyo.com/images/toolliyo-logo.png