解释:
这些 Views 是使用默认的脚手架类型生成的: "使用 Entity Framework 的 MVC 控制器,具有读/写操作和视图"
我想知道为什么在更改强类型 Model 并将其更改回来后,“不显示智能感知”不会显示智能感知。
<table>
<tr>
<th>
@Html.DisplayNameFor(model => model.UserName) <- DOES NOT SHOW UP (INTELLISENSE)unless strongly typed against a NON-Collection must remove lambda expression
</th>
<th>
@Html.DisplayNameFor(model => model.)<- DOES NOT SHOW UP (INTELLISENSE) unless strongly typed against a NON-Collection must remove lambda expression
</th>
<th>
@Html.DisplayNameFor(model => model.)<- DOES NOT SHOW UP (INTELLISENSE)unless strongly typed against a NON-Collection must remove lambda expression
</th>
<th>
</th>
</tr>
@foreach (var item in Model) {
<tr>
<td>
@Html.DisplayFor(modelItem => item.UserName)<- SHOWS INTELLISENSE
</td>
<td>
@Html.DisplayFor(modelItem => item.FirstName)<- SHOWS INTELLISENSE
</td>
<td>