7.5.1.3 Adding the View Model Data; e.g. 7.19 The ProductsListViewModel View Model

chap07
Jason Zhu 2021-08-21 17:15:36 +10:00
parent 109806d27e
commit 31e2fba368
2 changed files with 14 additions and 0 deletions

View File

@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace SportsStore.WebUI.Models
{
public class ProductsListViewModel
{
public IEnumerable<Product> Products { get; set; }
public PagingInfo PagingInfo { get; set; }
}
}

View File

@ -167,6 +167,7 @@
<Compile Include="HtmlHelpers\PagingHelpers.cs" /> <Compile Include="HtmlHelpers\PagingHelpers.cs" />
<Compile Include="Infrastructure\NinjectControllerFactory.cs" /> <Compile Include="Infrastructure\NinjectControllerFactory.cs" />
<Compile Include="Models\PagingInfo.cs" /> <Compile Include="Models\PagingInfo.cs" />
<Compile Include="Models\ProductsListViewModel.cs" />
<Compile Include="Product.cs"> <Compile Include="Product.cs">
<DependentUpon>EFDbContext.tt</DependentUpon> <DependentUpon>EFDbContext.tt</DependentUpon>
</Compile> </Compile>