+
+@{
+ ViewBag.Title = "Index";
+}
+
+Index
+
+
+ @Html.ActionLink("Create New", "Create")
+
+
+
+ |
+ @Html.DisplayNameFor(model => model.Category)
+ |
+ |
+
+
+@foreach (var item in Model) {
+
+ |
+ @Html.DisplayFor(modelItem => item.Category)
+ |
+
+ @Html.ActionLink("Edit", "Edit", new { id=item.Id }) |
+ @Html.ActionLink("Delete", "Delete", new { id=item.Id })
+ |
+
+}
+
+
diff --git a/MyShop/MyShop.WebUI/Views/ProductManager/Create.cshtml b/MyShop/MyShop.WebUI/Views/ProductManager/Create.cshtml
index 0ff0639..63914ab 100644
--- a/MyShop/MyShop.WebUI/Views/ProductManager/Create.cshtml
+++ b/MyShop/MyShop.WebUI/Views/ProductManager/Create.cshtml
@@ -1,4 +1,4 @@
-@model MyShop.Core.Models.Product
+@model MyShop.Core.ViewModels.ProductManagerViewModel
@{
ViewBag.Title = "Create";
@@ -16,42 +16,41 @@
@Html.ValidationSummary(true, "", new { @class = "text-danger" })
diff --git a/MyShop/MyShop.WebUI/Views/ProductManager/Edit.cshtml b/MyShop/MyShop.WebUI/Views/ProductManager/Edit.cshtml
index 92182a4..bc85f4f 100644
--- a/MyShop/MyShop.WebUI/Views/ProductManager/Edit.cshtml
+++ b/MyShop/MyShop.WebUI/Views/ProductManager/Edit.cshtml
@@ -1,4 +1,4 @@
-@model MyShop.Core.Models.Product
+@model MyShop.Core.ViewModels.ProductManagerViewModel
@{
ViewBag.Title = "Edit";
@@ -15,45 +15,44 @@
Product
@Html.ValidationSummary(true, "", new { @class = "text-danger" })
- @Html.HiddenFor(model => model.Id)
+ @Html.HiddenFor(model => model.product.Id)
diff --git a/MyShop/MyShop.WebUI/Views/Shared/_Layout.cshtml b/MyShop/MyShop.WebUI/Views/Shared/_Layout.cshtml
index 76452e9..3660c31 100644
--- a/MyShop/MyShop.WebUI/Views/Shared/_Layout.cshtml
+++ b/MyShop/MyShop.WebUI/Views/Shared/_Layout.cshtml
@@ -23,7 +23,7 @@
- @Html.ActionLink("Home", "Index", "Home")
- @Html.ActionLink("Product Admin", "Index", "ProductManager")
- - @Html.ActionLink("Contact", "Contact", "Home")
+ - @Html.ActionLink("Category Admin", "Index", "ProductCategoryManager")
@Html.Partial("_LoginPartial")