@model ContosoUniversity.ViewModels.InstructorIndexData @{ ViewBag.Title = "Instructors"; }

Instructors

@Html.ActionLink("Create New", "Create")

@foreach (var item in Model.Instructors) { string selectedRow = ""; if (item.InstructorID == ViewBag.InstructorID) { selectedRow = "selectedrow"; } }
Last Name First Name Hire Date Office
@Html.ActionLink("Select", "Index", new { id = item.InstructorID }) | @Html.ActionLink("Edit", "Edit", new { id = item.InstructorID }) | @Html.ActionLink("Details", "Details", new { id = item.InstructorID }) | @Html.ActionLink("Delete", "Delete", new { id = item.InstructorID }) @item.LastName @item.FirstMidName @Html.DisplayFor(modelItem => item.HireDate) @if (item.OfficeAssignment != null) { @item.OfficeAssignment.Location }