7.3.1 Adding a Controller; Listing 7-6 The Initial Contents of the Product Controller.cs File
This commit is contained in:
parent
56a61c71c8
commit
5cced2c5d9
@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.Mvc;
|
||||
using SportsStore.Domain.Abstract;
|
||||
|
||||
namespace SportsStore.WebUI.Controllers
|
||||
{
|
||||
public class ProductController : Controller
|
||||
{
|
||||
private IProductRepository repository;
|
||||
|
||||
public ProductController(IProductRepository productRepository)
|
||||
{
|
||||
this.repository = productRepository;
|
||||
}
|
||||
}
|
||||
}
|
@ -109,6 +109,7 @@
|
||||
<ItemGroup>
|
||||
<Compile Include="App_Start\NinjectWebCommon.cs" />
|
||||
<Compile Include="App_Start\RouteConfig.cs" />
|
||||
<Compile Include="Controllers\ProductController.cs" />
|
||||
<Compile Include="Global.asax.cs">
|
||||
<DependentUpon>Global.asax</DependentUpon>
|
||||
</Compile>
|
||||
@ -127,8 +128,8 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="App_Data\" />
|
||||
<Folder Include="Controllers\" />
|
||||
<Folder Include="Models\" />
|
||||
<Folder Include="Views\Product\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\SportsStore.Domain\SportsStore.Domain.csproj">
|
||||
|
Loading…
x
Reference in New Issue
Block a user