From 8a278602184269982a7cd9020ecc49d34c0b4db4 Mon Sep 17 00:00:00 2001 From: "jason.zhu" Date: Tue, 22 Jun 2021 12:23:19 +1000 Subject: [PATCH] Created storecontroller --- MvcMusicStore/Controllers/HomeController.cs | 4 +-- MvcMusicStore/Controllers/StoreController.cs | 29 ++++++++++++++++++++ MvcMusicStore/MvcMusicStore.csproj | 2 ++ 3 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 MvcMusicStore/Controllers/StoreController.cs diff --git a/MvcMusicStore/Controllers/HomeController.cs b/MvcMusicStore/Controllers/HomeController.cs index cdb1a68..6226311 100644 --- a/MvcMusicStore/Controllers/HomeController.cs +++ b/MvcMusicStore/Controllers/HomeController.cs @@ -8,9 +8,9 @@ namespace MvcMusicStore.Controllers { public class HomeController : Controller { - public ActionResult Index() + public String Index() { - return View(); + return "I like cake!"; } public ActionResult About() diff --git a/MvcMusicStore/Controllers/StoreController.cs b/MvcMusicStore/Controllers/StoreController.cs new file mode 100644 index 0000000..db9df78 --- /dev/null +++ b/MvcMusicStore/Controllers/StoreController.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.Mvc; + +namespace MvcMusicStore.Controllers +{ + public class StoreController : Controller + { + // GET: Store + public string Index() + { + return "Hello from Store.Index()"; + } + // + // GET: /Store/Browse + public string Browse() + { + return "Hello from Store.Browse()"; + } + // + // GET: /Store/Details + public string Details() + { + return "Hello from Store.Details()"; + } + } +} \ No newline at end of file diff --git a/MvcMusicStore/MvcMusicStore.csproj b/MvcMusicStore/MvcMusicStore.csproj index 3e64a4d..defea00 100644 --- a/MvcMusicStore/MvcMusicStore.csproj +++ b/MvcMusicStore/MvcMusicStore.csproj @@ -121,6 +121,7 @@ + Global.asax @@ -166,6 +167,7 @@ +