Skip to content

Instantly share code, notes, and snippets.

@GeorgeWL
Created November 29, 2016 16:47
Show Gist options
  • Save GeorgeWL/6159423bab0f7babbaa29291bebf5ba8 to your computer and use it in GitHub Desktop.
Save GeorgeWL/6159423bab0f7babbaa29291bebf5ba8 to your computer and use it in GitHub Desktop.
@model IEnumerable<Forest.Data.Music_category>
@{
ViewBag.Title = "Categories";
}
<h2>Categories</h2>
<p>
@Html.ActionLink("Create New", "Create")
</p>
<table class="table">
<tr>
<th>
@Html.DisplayNameFor(model => model.Genre)
</th>
<th></th>
</tr>
@foreach (var item in Model) {
<tr>
<td>
@*Html.DisplayFor(modelItem => item.Id)*@
@Html.ActionLink(item.Genre, "Recordings", new { genre = item.Genre })
</td>
<td>
@Html.ActionLink("Edit", "Edit", new { id=item.Id }) |
@Html.ActionLink("Details", "Details", new { id=item.Id }) |
@Html.ActionLink("Delete", "Delete", new { id=item.Id })
</td>
</tr>
}
</table>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment