7.3.2.1 Rendering the View Data; Listing 7-9 Editing the List.cshtml File
This commit is contained in:
parent
58649f0ee8
commit
0fe4d1105b
@ -1,8 +1,15 @@
|
||||
@model SportsStore.Domain.Entities.Product
|
||||
@using SportsStore.Domain.Entities
|
||||
@model IEnumerable<Product>
|
||||
|
||||
@{
|
||||
ViewBag.Title = "List";
|
||||
ViewBag.Title = "Products";
|
||||
}
|
||||
|
||||
<h2>List</h2>
|
||||
|
||||
@foreach (var p in Model)
|
||||
{
|
||||
<div>
|
||||
<h3>@p.Name</h3>
|
||||
@p.Description
|
||||
<h4>@p.Price.ToString("c")</h4>
|
||||
</div>
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user