Skip to content

Confusing example of DisplayFor. #22000

Closed
@LeTranAnhVu

Description

@LeTranAnhVu

[Enter feedback here]
I found the unclear code in https://docs.microsoft.com/en-us/aspnet/core/tutorials/razor-pages/page?view=aspnetcore-5.0&tabs=visual-studio#the-create-delete-details-and-edit-pages

In the above section, there is a example of Pages/Movies/Index.cshtml :
@Html.DisplayFor(modelItem => item.Title)

Why does modelItem can relate to item?

Do I miss something or it is typo?


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions