From 1ffd5ba6adefb7a8e6fbda355edde362cd2da3b3 Mon Sep 17 00:00:00 2001 From: Jason Zhu Date: Wed, 8 Sep 2021 10:44:26 +1000 Subject: [PATCH] 7.3.1 Adding a Controller; Listing 7-7 Adding an Action Method to the ProductController.cs File --- .../SportsStore.WebUI/Controllers/ProductController.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/SportsStore/SportsStore.WebUI/Controllers/ProductController.cs b/SportsStore/SportsStore.WebUI/Controllers/ProductController.cs index 9e2467a..7c08402 100644 --- a/SportsStore/SportsStore.WebUI/Controllers/ProductController.cs +++ b/SportsStore/SportsStore.WebUI/Controllers/ProductController.cs @@ -15,5 +15,10 @@ namespace SportsStore.WebUI.Controllers { this.repository = productRepository; } + + public ViewResult List() + { + return View(repository.Products); + } } } \ No newline at end of file