7.3.3 Setting the Default Route; e.g. 7.8 The List.cshtml View
parent
6217886a88
commit
1d1e1b3cc9
|
@ -136,7 +136,7 @@
|
|||
<Compile Include="App_Start\FilterConfig.cs" />
|
||||
<Compile Include="App_Start\RouteConfig.cs" />
|
||||
<Compile Include="Controllers\HomeController.cs" />
|
||||
<Compile Include="Controllers\ProductrController.cs" />
|
||||
<Compile Include="Controllers\ProductController.cs" />
|
||||
<Compile Include="Global.asax.cs">
|
||||
<DependentUpon>Global.asax</DependentUpon>
|
||||
</Compile>
|
||||
|
@ -179,6 +179,7 @@
|
|||
<Content Include="Views\Home\About.cshtml" />
|
||||
<Content Include="Views\Home\Contact.cshtml" />
|
||||
<Content Include="Views\Home\Index.cshtml" />
|
||||
<Content Include="Views\Product\List.cshtml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="App_Data\" />
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
@model IEnumerable<SportsStore.Domain.Entities.Product>
|
||||
|
||||
@{
|
||||
ViewBag.Title = "Products";
|
||||
}
|
||||
|
||||
@foreach (var p in Model)
|
||||
{
|
||||
<div class="item">
|
||||
<h3>@p.Name</h3>
|
||||
@p.Description
|
||||
<h4>@p.Price.ToString("c")</h4>
|
||||
</div>
|
||||
}
|
Loading…
Reference in New Issue