LyraLearn AI Learning Platform
Exams
← Back to the lesson
Module 4 Β· Quiz

Tracking and DbContext Lifetime

1. What does `AsNoTracking()` do in EF Core?
2. Why might an entity not save when calling `SaveChanges()`?
3. What is a consequence of injecting a scoped DbContext into a singleton?
4. How should a DbContext be used within a `BackgroundService` to avoid issues?