From 2239b4056832c5e2040711e1d93e9cb99656ed26 Mon Sep 17 00:00:00 2001 From: Hamid Molareza <35568753+HamidMolareza@users.noreply.github.com> Date: Tue, 14 Apr 2020 04:55:12 +0430 Subject: [PATCH] Update read-related-data.md (#17773) * Update read-related-data.md Add an explanation of why AsNoTracking method was not used. Fix #17764 * Update read-related-data.md * Update read-related-data.md Co-authored-by: Rick Anderson <3605364+Rick-Anderson@users.noreply.github.com> --- aspnetcore/data/ef-rp/read-related-data.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/aspnetcore/data/ef-rp/read-related-data.md b/aspnetcore/data/ef-rp/read-related-data.md index 5684ad37dc..f85ae5cb5a 100644 --- a/aspnetcore/data/ef-rp/read-related-data.md +++ b/aspnetcore/data/ef-rp/read-related-data.md @@ -132,6 +132,8 @@ The following code loads related data with the `Select` method: [!code-csharp[](intro/samples/cu30snapshots/6-related/Pages/Courses/IndexSelect.cshtml.cs?name=snippet_RevisedIndexMethod&highlight=6)] +The preceding code doesn't return any entity types, therefore no tracking is done. For more information about the EF tracking, see [Tracking vs. No-Tracking Queries](/ef/core/querying/tracking). + The `CourseViewModel`: [!code-csharp[](intro/samples/cu30snapshots/6-related/Models/SchoolViewModels/CourseViewModel.cs?name=snippet)]