解释:
视图是使用默认的脚手架类型生成的:“具有读/写操作和视图的 MVC 控制器,使用实体框架”
我想知道为什么“不显示智能感知”在更改强类型模型后不显示智能感知,即使你将它改回来。
<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>