@using UniversityContracts.ViewModels @model List @{ ViewData["Title"] = "Report by teachers and students"; }

@ViewData["Title"]

@foreach (var item in Model) { @foreach (var student in item.Students) { } }
Id Teacher name Student Student
@Html.DisplayFor(modelItem => item.TeacherId) @Html.DisplayFor(modelItem => item.TeacherName) @foreach (var st in item.Students) {
@Html.DisplayFor(modelItem => st)
}
@student.Name @student.PhoneNumber