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();

More from Entity Framework Core Tutorial

All questions for this course
Toolliyo Assistant
Ask about tutorials, ebooks, training, pricing, mentor services, and support. I use public site content only—not admin or internal tools.

care@toolliyo.com

Need callback? Share your details