Add note about omission of .AsNoTracking (#14031)
parent
92d99bca11
commit
627664db20
|
@ -234,7 +234,7 @@ Suppose you expected users to only rarely want to see enrollments in a selected
|
|||
|
||||
[!code-csharp[](intro/samples/cu/Controllers/InstructorsController.cs?name=snippet_ExplicitLoading&highlight=23-29)]
|
||||
|
||||
The new code drops the *ThenInclude* method calls for enrollment data from the code that retrieves instructor entities. If an instructor and course are selected, the highlighted code retrieves Enrollment entities for the selected course, and Student entities for each Enrollment.
|
||||
The new code drops the *ThenInclude* method calls for enrollment data from the code that retrieves instructor entities. It also drops `AsNoTracking`. If an instructor and course are selected, the highlighted code retrieves Enrollment entities for the selected course, and Student entities for each Enrollment.
|
||||
|
||||
Run the app, go to the Instructors Index page now and you'll see no difference in what's displayed on the page, although you've changed how the data is retrieved.
|
||||
|
||||
|
|
Loading…
Reference in New Issue