7.5.1.3 Adding the View Model Data; Listing 7-22 Updating the List.cshtml File

chap07
Jason Zhu 2021-09-08 15:43:25 +10:00
parent a5e527e9b8
commit 237a9f0aa8
1 changed files with 3 additions and 3 deletions

View File

@ -1,11 +1,11 @@
@using SportsStore.Domain.Entities
@model IEnumerable<Product>

@model SportsStore.WebUI.Models.ProductsListViewModel
@{
ViewBag.Title = "Products";
}
@foreach (var p in Model)
@foreach (var p in Model.Products)
{
<div>
<h3>@p.Name</h3>