Movies are editable as well
This commit is contained in:
@ -5,6 +5,7 @@
|
||||
}
|
||||
|
||||
<h2>Movies</h2>
|
||||
@Html.ActionLink("New Movie", "New", "Movies", null, new { @class = "btn btn-primary" })
|
||||
|
||||
@if (Model.Movies.Count == 0)
|
||||
{
|
||||
@ -12,21 +13,21 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
<table class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Movie</th>
|
||||
<th>Genre</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var movie in Model.Movies)
|
||||
{
|
||||
<tr>
|
||||
<td>@Html.ActionLink(@movie.Name,"Movies","Movies",new { id = movie.Id },null) </td>
|
||||
<td>@movie.MovieGenre.Name</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
<table class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Movie</th>
|
||||
<th>Genre</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var movie in Model.Movies)
|
||||
{
|
||||
<tr>
|
||||
<td>@Html.ActionLink(@movie.Name, "Edit", "Movies", new { id = movie.Id }, null) </td>
|
||||
<td>@movie.MovieGenre.Name</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
}
|
||||
Reference in New Issue
Block a user