7.3.1 Adding a Controller; Listing 7-7 Adding an Action Method to the ProductController.cs File

chap07
Jason Zhu 2021-09-08 10:44:26 +10:00
parent 5cced2c5d9
commit 1ffd5ba6ad
1 changed files with 5 additions and 0 deletions

View File

@ -15,5 +15,10 @@ namespace SportsStore.WebUI.Controllers
{
this.repository = productRepository;
}
public ViewResult List()
{
return View(repository.Products);
}
}
}