From 627664db208d82c6e02267f9cd7d238bba4052f4 Mon Sep 17 00:00:00 2001 From: Tom Dykstra Date: Tue, 27 Aug 2019 08:06:07 -0700 Subject: [PATCH] Add note about omission of .AsNoTracking (#14031) --- aspnetcore/data/ef-mvc/read-related-data.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aspnetcore/data/ef-mvc/read-related-data.md b/aspnetcore/data/ef-mvc/read-related-data.md index 4a207a0a2c38..a28d615b53ef 100644 --- a/aspnetcore/data/ef-mvc/read-related-data.md +++ b/aspnetcore/data/ef-mvc/read-related-data.md @@ -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.