我有一个带有计算列的数据库表。计算列将两个名称(名字和姓氏)合并为一个显示名称。在下面的代码中,我想指定名为 DisplayName 的计算列的值。我该怎么做呢?谢谢!
仅供参考,这是 MVC Beta 4。
<div class="editor-label">
@Html.LabelFor(model => model.PdId, "Pd")
</div>
<div class="editor-field">
@Html.DropDownList("PdId", String.Empty)
@Html.ValidationMessageFor(model => model.PdId)
</div>