diff --git a/Controllers/BundlesController.cs b/Controllers/BundlesController.cs index 1f5c212..aeefebb 100644 --- a/Controllers/BundlesController.cs +++ b/Controllers/BundlesController.cs @@ -32,5 +32,16 @@ namespace MyDarling.Controllers } return RedirectToAction("Index"); } + + public ActionResult Add() + { + return View(); + } + [HttpPost] + public ActionResult Add(UnderwearBundle b) + { + repository.Add(b); + return RedirectToAction("Index"); + } } } \ No newline at end of file diff --git a/Views/Bundles/Add.cshtml b/Views/Bundles/Add.cshtml new file mode 100644 index 0000000..81b3061 --- /dev/null +++ b/Views/Bundles/Add.cshtml @@ -0,0 +1,33 @@ +@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers +@model MyDarling.Models.UnderwearBundle + + + + + + New bundle + + + + + +
+
+
+ + +
+
+ + +
+
+ + +
+ +
+
+ + + \ No newline at end of file diff --git a/Views/Bundles/Index.cshtml b/Views/Bundles/Index.cshtml index e93edb2..01c5a31 100644 --- a/Views/Bundles/Index.cshtml +++ b/Views/Bundles/Index.cshtml @@ -34,6 +34,7 @@ } + Add bundle