Update search3.md (#3554)

pull/3555/head
Rick Anderson 2017-06-22 14:12:24 -07:00 committed by GitHub
parent 4e2b3e3fb4
commit 80422bfe45
1 changed files with 1 additions and 1 deletions

View File

@ -59,6 +59,6 @@ Examine the lambda expression used in the following HTML Helper:
`@Html.DisplayNameFor(model => model.movies[0].Title)`
In the preceding code, the `DisplayNameFor` HTML Helper inspects the `Title` property referenced in the lambda expression to determine the display name. Since the lambda expression is inspected rather than evaluated, you don't receive an access violation when `model`, `model.movies`, or `model.movies[0]` are `null` or empty. When the lambda expression is evaluated (for example, `@Html.DisplayFor(model => model.movies[0].Title)`), the model's property values are evaluated.
In the preceding code, the `DisplayNameFor` HTML Helper inspects the `Title` property referenced in the lambda expression to determine the display name. Since the lambda expression is inspected rather than evaluated, you don't receive an access violation when `model`, `model.movies`, or `model.movies[0]` are `null` or empty. When the lambda expression is evaluated (for example, `@Html.DisplayFor(modelItem => item.Title)`), the model's property values are evaluated.
Test the app by searching by genre, by movie title, and by both.