I have a DB with a table with multiple rows. The first column of the table is the ID, the second is name and the third is surname. In every tutorial that I have watched they use a foreach and by using that they show all the information in their table. I want to know how can I show only the cells that I want. So for example I have 3 names and I want to show all the names I use:
@foreach (var item in Model)
{
<div>
<div>@item.name</div>
<h4>@item.surname</h4>
<hr />
</div>
}
But how can I do to show only the second name and surname?
Thanks in advance!