Lite upprensning bland kontroller och views, cutomers kan läggas till och uppdateras
This commit is contained in:
32
Vidly/Views/Movies/Index.cshtml
Normal file
32
Vidly/Views/Movies/Index.cshtml
Normal file
@ -0,0 +1,32 @@
|
||||
@model Vidly.ViewModels.MoviesViewModel
|
||||
@{
|
||||
ViewBag.Title = "Movies";
|
||||
Layout = "~/Views/Shared/_Layout.cshtml";
|
||||
}
|
||||
|
||||
<h2>Movies</h2>
|
||||
|
||||
@if (Model.Movies.Count == 0)
|
||||
{
|
||||
<text>No one has rented this movie before.</text>
|
||||
}
|
||||
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>
|
||||
}
|
||||
Reference in New Issue
Block a user