Skip to content

Commit 2239b40

Browse files
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>
1 parent a97478f commit 2239b40

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

aspnetcore/data/ef-rp/read-related-data.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,8 @@ The following code loads related data with the `Select` method:
132132

133133
[!code-csharp[](intro/samples/cu30snapshots/6-related/Pages/Courses/IndexSelect.cshtml.cs?name=snippet_RevisedIndexMethod&highlight=6)]
134134

135+
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).
136+
135137
The `CourseViewModel`:
136138

137139
[!code-csharp[](intro/samples/cu30snapshots/6-related/Models/SchoolViewModels/CourseViewModel.cs?name=snippet)]

0 commit comments

Comments
 (0)