I am learning MVC and for do this I am developing a "smart forum". How can I get value from Model directly , without foreach iteration when data is "a single row"?
@model IEnumerable<WebApplication28.ModelsFromDb.ArgomentiViewModel> @foreach (var item in Model) { <dl class="dl-horizontal"> <dt> @Html.DisplayNameFor(model => model.NomeArea) </dt> <dd> @Html.DisplayFor(modelItem => item.NomeArea) </dd> }
IEnumerableinto the view.