Min lösning på övningen

This commit is contained in:
2019-01-17 23:11:33 +01:00
parent b6bf2776a8
commit cd91acdf53
12 changed files with 189 additions and 7 deletions

View File

@ -0,0 +1,23 @@
@model Vidly.ViewModels.CustomersViewModel
@{
ViewBag.Title = "Customers";
Layout = "~/Views/Shared/_Layout.cshtml";
}
<h2>Customers</h2>
@if (Model.Customers.Count == 0)
{
<text>No one has rented this movie before.</text>
}
else
{
<ul>
@foreach (var customer in Model.Customers)
{
@*<li>@customer.Name</li>*@
<li>@Html.ActionLink(@customer.Name, "Details", "Customers", new { id = @customer.Id },null)</li>
}
</ul>
}