diff --git a/MyShop/MyShop.Core/Models/Product.cs b/MyShop/MyShop.Core/Models/Product.cs new file mode 100644 index 0000000..b65bc5b --- /dev/null +++ b/MyShop/MyShop.Core/Models/Product.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MyShop.Core.Models +{ + public class Product + { + public string Id { get; set; } + + [StringLength(20)] + [DisplayName("Product Name")] + public string Name { get; set; } + public string Description { get; set; } + + [Range(0,1000)] + public decimal Price { get; set; } + public string Category { get; set; } + public string Image { get; set; } + + public Product() { + this.Id = Guid.NewGuid().ToString(); + } + } +} diff --git a/MyShop/MyShop.Core/Models/ProductCategory.cs b/MyShop/MyShop.Core/Models/ProductCategory.cs new file mode 100644 index 0000000..6b32bf8 --- /dev/null +++ b/MyShop/MyShop.Core/Models/ProductCategory.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MyShop.Core.Models +{ + public class ProductCategory + { + public string Id { get; set; } + public string Category { get; set; } + + public ProductCategory(){ + this.Id = Guid.NewGuid().ToString(); + } + } +} diff --git a/MyShop/MyShop.Core/MyShop.Core.csproj b/MyShop/MyShop.Core/MyShop.Core.csproj index e6e54ce..ace8b4f 100644 --- a/MyShop/MyShop.Core/MyShop.Core.csproj +++ b/MyShop/MyShop.Core/MyShop.Core.csproj @@ -31,6 +31,7 @@ + @@ -40,7 +41,10 @@ + + + \ No newline at end of file diff --git a/MyShop/MyShop.Core/ViewModels/ProductManagerViewModel.cs b/MyShop/MyShop.Core/ViewModels/ProductManagerViewModel.cs new file mode 100644 index 0000000..fdcc43e --- /dev/null +++ b/MyShop/MyShop.Core/ViewModels/ProductManagerViewModel.cs @@ -0,0 +1,15 @@ +using MyShop.Core.Models; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MyShop.Core.ViewModels +{ + public class ProductManagerViewModel + { + public Product product { get; set; } + public IEnumerable ProductCategories { get; set; } + } +} diff --git a/MyShop/MyShop.DataAccess.InMemory/MyShop.DataAccess.InMemory.csproj b/MyShop/MyShop.DataAccess.InMemory/MyShop.DataAccess.InMemory.csproj index c9150aa..0906a9e 100644 --- a/MyShop/MyShop.DataAccess.InMemory/MyShop.DataAccess.InMemory.csproj +++ b/MyShop/MyShop.DataAccess.InMemory/MyShop.DataAccess.InMemory.csproj @@ -32,6 +32,7 @@ + @@ -40,7 +41,15 @@ + + + + + {9b029460-6f4e-46ae-9b88-08c5fe08c0a4} + MyShop.Core + + \ No newline at end of file diff --git a/MyShop/MyShop.DataAccess.InMemory/ProductCategoryRepository.cs b/MyShop/MyShop.DataAccess.InMemory/ProductCategoryRepository.cs new file mode 100644 index 0000000..370f692 --- /dev/null +++ b/MyShop/MyShop.DataAccess.InMemory/ProductCategoryRepository.cs @@ -0,0 +1,83 @@ +using MyShop.Core.Models; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.Caching; +using System.Text; +using System.Threading.Tasks; + +namespace MyShop.DataAccess.InMemory +{ + public class ProductCategoryRepository + { + ObjectCache cache = MemoryCache.Default; + List productsCategory = new List(); + + public ProductCategoryRepository() + { + productsCategory = cache["productsCategory"] as List; + + if (productsCategory == null) + { + productsCategory = new List(); + } + } + + public void Commit() + { + cache["productsCategory"] = productsCategory; + } + + public void Insert(ProductCategory p) + { + productsCategory.Add(p); + } + + public void Update(ProductCategory product) + { + ProductCategory productToUpdate = productsCategory.Find(p => p.Id == product.Id); + + if (productToUpdate != null) + { + productToUpdate = product; + } + else + { + throw new Exception("Product not found"); + } + } + + public ProductCategory Find(string Id) + { + ProductCategory product = productsCategory.Find(p => p.Id == Id); + + if (product != null) + { + return product; + } + else + { + throw new Exception("Product not found"); + } + } + + public IQueryable Collection() + { + return productsCategory.AsQueryable(); + } + + public void Delete(string Id) + { + ProductCategory productToDelete = productsCategory.Find(p => p.Id == Id); + + if (productToDelete != null) + { + productsCategory.Remove(productToDelete); + } + else + { + throw new Exception("Product not found"); + } + } + } +} diff --git a/MyShop/MyShop.DataAccess.InMemory/ProductRepository.cs b/MyShop/MyShop.DataAccess.InMemory/ProductRepository.cs new file mode 100644 index 0000000..a1e78b8 --- /dev/null +++ b/MyShop/MyShop.DataAccess.InMemory/ProductRepository.cs @@ -0,0 +1,75 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Runtime.Caching; +using MyShop.Core; +using MyShop.Core.Models; + +namespace MyShop.DataAccess.InMemory +{ + public class ProductRepository + { + ObjectCache cache = MemoryCache.Default; + List products = new List(); + + public ProductRepository() { + products = cache["products"] as List; + + if (products == null) + { + products = new List(); + } + } + + public void Commit() { + cache["products"] = products; + } + + public void Insert(Product p) { + products.Add(p); + } + + public void Update(Product product) { + Product productToUpdate = products.Find(p => p.Id == product.Id); + + if (productToUpdate != null) { + productToUpdate = product; + } + else { + throw new Exception("Product not found"); + } + } + + public Product Find(string Id) { + Product product = products.Find(p => p.Id == Id); + + if (product != null) + { + return product; + } + else + { + throw new Exception("Product not found"); + } + } + + public IQueryable Collection() { + return products.AsQueryable(); + } + + public void Delete(string Id) { + Product productToDelete = products.Find(p => p.Id == Id); + + if (productToDelete != null) + { + products.Remove(productToDelete); + } + else + { + throw new Exception("Product not found"); + } + } + } +} diff --git a/MyShop/MyShop.WebUI/Controllers/ProductCategoryManagerController.cs b/MyShop/MyShop.WebUI/Controllers/ProductCategoryManagerController.cs new file mode 100644 index 0000000..bb8fbfd --- /dev/null +++ b/MyShop/MyShop.WebUI/Controllers/ProductCategoryManagerController.cs @@ -0,0 +1,115 @@ +using MyShop.Core.Models; +using MyShop.DataAccess.InMemory; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.Mvc; + +namespace MyShop.WebUI.Controllers +{ + public class ProductCategoryManagerController : Controller + { + ProductCategoryRepository context; + + public ProductCategoryManagerController() + { + context = new ProductCategoryRepository(); + } + + // GET: ProductManager + public ActionResult Index() + { + List productsCategories = context.Collection().ToList(); + return View(productsCategories); + } + + public ActionResult Create() + { + ProductCategory productCategory = new ProductCategory(); + return View(productCategory); + } + + [HttpPost] + public ActionResult Create(ProductCategory productCategory) + { + if (!ModelState.IsValid) + { + return View(productCategory); + } + else + { + context.Insert(productCategory); + context.Commit(); + + return RedirectToAction("Index"); + } + } + + public ActionResult Edit(string Id) + { + ProductCategory productCategory = context.Find(Id); + if (productCategory == null) + { + return HttpNotFound(); + } + else + { + return View(productCategory); + } + } + + [HttpPost] + public ActionResult Edit(ProductCategory productCategory, string Id) + { + ProductCategory productToEdit = context.Find(Id); + if (productToEdit == null) + { + return HttpNotFound(); + } + else + { + if (!ModelState.IsValid) + { + return View(productToEdit); + } + productToEdit.Category = productCategory.Category; + + context.Commit(); + + return RedirectToAction("Index"); + } + } + + public ActionResult Delete(string Id) + { + ProductCategory productToDelete = context.Find(Id); + if (productToDelete == null) + { + return HttpNotFound(); + } + else + { + return View(productToDelete); + } + } + + [HttpPost] + [ActionName("Delete")] + public ActionResult ConfirmDelete(string Id) + { + ProductCategory productToDelete = context.Find(Id); + if (productToDelete == null) + { + return HttpNotFound(); + } + else + { + context.Delete(Id); + context.Commit(); + return RedirectToAction("Index"); + } + + } + } +} \ No newline at end of file diff --git a/MyShop/MyShop.WebUI/Controllers/ProductManagerController.cs b/MyShop/MyShop.WebUI/Controllers/ProductManagerController.cs new file mode 100644 index 0000000..10993e9 --- /dev/null +++ b/MyShop/MyShop.WebUI/Controllers/ProductManagerController.cs @@ -0,0 +1,116 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.Mvc; +using MyShop.Core.Models; +using MyShop.Core.ViewModels; +using MyShop.DataAccess.InMemory; + +namespace MyShop.WebUI.Controllers +{ + public class ProductManagerController : Controller + { + ProductRepository context; + ProductCategoryRepository productCategories; + + public ProductManagerController() { + context = new ProductRepository(); + productCategories = new ProductCategoryRepository(); + } + // GET: ProductManager + public ActionResult Index() + { + List products = context.Collection().ToList(); + return View(products); + } + + public ActionResult Create() { + ProductManagerViewModel viewModel = new ProductManagerViewModel(); + viewModel.product = new Product(); + viewModel.ProductCategories = productCategories.Collection(); + return View(viewModel); + } + + [HttpPost] + public ActionResult Create(Product product) { + if (!ModelState.IsValid) + { + return View(product); + } + else { + context.Insert(product); + context.Commit(); + + return RedirectToAction("Index"); + } + } + + public ActionResult Edit(string Id) { + Product product = context.Find(Id); + if (product == null) + { + return HttpNotFound(); + } + else { + ProductManagerViewModel viewModel = new ProductManagerViewModel(); + viewModel.product = product; + viewModel.ProductCategories = productCategories.Collection(); + return View(viewModel); + } + } + + [HttpPost] + public ActionResult Edit(Product product, string Id) { + Product productToEdit = context.Find(Id); + if (productToEdit == null) + { + return HttpNotFound(); + } + else { + if (!ModelState.IsValid) + { + return View(productToEdit); + } + productToEdit.Name = product.Name; + productToEdit.Description = product.Description; + productToEdit.Price = product.Price; + productToEdit.Category = product.Category; + productToEdit.Image = product.Image; + + context.Commit(); + + return RedirectToAction("Index"); + } + } + + public ActionResult Delete(string Id) { + Product productToDelete = context.Find(Id); + if (productToDelete == null) + { + return HttpNotFound(); + } + else { + return View(productToDelete); + } + } + + [HttpPost] + [ActionName("Delete")] + public ActionResult ConfirmDelete(string Id) + { + Product productToDelete = context.Find(Id); + if (productToDelete == null) + { + return HttpNotFound(); + } + else + { + context.Delete(Id); + context.Commit(); + return RedirectToAction("Index"); + } + + } + } +} \ No newline at end of file diff --git a/MyShop/MyShop.WebUI/MyShop.WebUI.csproj b/MyShop/MyShop.WebUI/MyShop.WebUI.csproj index 5ff57ac..b122d50 100644 --- a/MyShop/MyShop.WebUI/MyShop.WebUI.csproj +++ b/MyShop/MyShop.WebUI/MyShop.WebUI.csproj @@ -196,6 +196,8 @@ + + Global.asax @@ -276,6 +278,14 @@ + + + + + + + + @@ -285,6 +295,24 @@ + + + {9b029460-6f4e-46ae-9b88-08c5fe08c0a4} + MyShop.Core + + + {e7fd92a1-7304-4f70-9ba5-e214cb28a863} + MyShop.DataAccess.InMemory + + + {3a4704f8-042d-4450-a79a-aa096ed4f5cd} + MyShop.DataAccess.SQL + + + {462aa931-d9e7-4b8a-840b-c8026f2c0fc0} + MyShop.Services + + 10.0 $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) diff --git a/MyShop/MyShop.WebUI/Views/ProductCategoryManager/Create.cshtml b/MyShop/MyShop.WebUI/Views/ProductCategoryManager/Create.cshtml new file mode 100644 index 0000000..93dd2ae --- /dev/null +++ b/MyShop/MyShop.WebUI/Views/ProductCategoryManager/Create.cshtml @@ -0,0 +1,40 @@ +@model MyShop.Core.Models.ProductCategory + +@{ + ViewBag.Title = "Create"; +} + +

Create

+ + +@using (Html.BeginForm()) +{ + @Html.AntiForgeryToken() + +
+

ProductCategory

+
+ @Html.ValidationSummary(true, "", new { @class = "text-danger" }) +
+ @Html.LabelFor(model => model.Category, htmlAttributes: new { @class = "control-label col-md-2" }) +
+ @Html.EditorFor(model => model.Category, new { htmlAttributes = new { @class = "form-control" } }) + @Html.ValidationMessageFor(model => model.Category, "", new { @class = "text-danger" }) +
+
+ +
+
+ +
+
+
+} + +
+ @Html.ActionLink("Back to List", "Index") +
+ +@section Scripts { + @Scripts.Render("~/bundles/jqueryval") +} diff --git a/MyShop/MyShop.WebUI/Views/ProductCategoryManager/Delete.cshtml b/MyShop/MyShop.WebUI/Views/ProductCategoryManager/Delete.cshtml new file mode 100644 index 0000000..af479f4 --- /dev/null +++ b/MyShop/MyShop.WebUI/Views/ProductCategoryManager/Delete.cshtml @@ -0,0 +1,32 @@ +@model MyShop.Core.Models.ProductCategory + +@{ + ViewBag.Title = "Delete"; +} + +

Delete

+ +

Are you sure you want to delete this?

+
+

ProductCategory

+
+
+
+ @Html.DisplayNameFor(model => model.Category) +
+ +
+ @Html.DisplayFor(model => model.Category) +
+ +
+ + @using (Html.BeginForm()) { + @Html.AntiForgeryToken() + +
+ | + @Html.ActionLink("Back to List", "Index") +
+ } +
diff --git a/MyShop/MyShop.WebUI/Views/ProductCategoryManager/Edit.cshtml b/MyShop/MyShop.WebUI/Views/ProductCategoryManager/Edit.cshtml new file mode 100644 index 0000000..df5f2ca --- /dev/null +++ b/MyShop/MyShop.WebUI/Views/ProductCategoryManager/Edit.cshtml @@ -0,0 +1,42 @@ +@model MyShop.Core.Models.ProductCategory + +@{ + ViewBag.Title = "Edit"; +} + +

Edit

+ + +@using (Html.BeginForm()) +{ + @Html.AntiForgeryToken() + +
+

ProductCategory

+
+ @Html.ValidationSummary(true, "", new { @class = "text-danger" }) + @Html.HiddenFor(model => model.Id) + +
+ @Html.LabelFor(model => model.Category, htmlAttributes: new { @class = "control-label col-md-2" }) +
+ @Html.EditorFor(model => model.Category, new { htmlAttributes = new { @class = "form-control" } }) + @Html.ValidationMessageFor(model => model.Category, "", new { @class = "text-danger" }) +
+
+ +
+
+ +
+
+
+} + +
+ @Html.ActionLink("Back to List", "Index") +
+ +@section Scripts { + @Scripts.Render("~/bundles/jqueryval") +} diff --git a/MyShop/MyShop.WebUI/Views/ProductCategoryManager/Index.cshtml b/MyShop/MyShop.WebUI/Views/ProductCategoryManager/Index.cshtml new file mode 100644 index 0000000..e51f239 --- /dev/null +++ b/MyShop/MyShop.WebUI/Views/ProductCategoryManager/Index.cshtml @@ -0,0 +1,32 @@ +@model IEnumerable + +@{ + ViewBag.Title = "Index"; +} + +

Index

+ +

+ @Html.ActionLink("Create New", "Create") +

+ + + + + + +@foreach (var item in Model) { + + + + +} + +
+ @Html.DisplayNameFor(model => model.Category) +
+ @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 new file mode 100644 index 0000000..63914ab --- /dev/null +++ b/MyShop/MyShop.WebUI/Views/ProductManager/Create.cshtml @@ -0,0 +1,71 @@ +@model MyShop.Core.ViewModels.ProductManagerViewModel + +@{ + ViewBag.Title = "Create"; +} + +

Create

+ + +@using (Html.BeginForm()) +{ + @Html.AntiForgeryToken() + +
+

Product

+
+ @Html.ValidationSummary(true, "", new { @class = "text-danger" }) +
+ @Html.LabelFor(model => model.product.Name, htmlAttributes: new { @class = "control-label col-md-2" }) +
+ @Html.EditorFor(model => model.product.Name, new { htmlAttributes = new { @class = "form-control" } }) + @Html.ValidationMessageFor(model => model.product.Name, "", new { @class = "text-danger" }) +
+
+ +
+ @Html.LabelFor(model => model.product.Description, htmlAttributes: new { @class = "control-label col-md-2" }) +
+ @Html.EditorFor(model => model.product.Description, new { htmlAttributes = new { @class = "form-control" } }) + @Html.ValidationMessageFor(model => model.product.Description, "", new { @class = "text-danger" }) +
+
+ +
+ @Html.LabelFor(model => model.product.Price, htmlAttributes: new { @class = "control-label col-md-2" }) +
+ @Html.EditorFor(model => model.product.Price, new { htmlAttributes = new { @class = "form-control" } }) + @Html.ValidationMessageFor(model => model.product.Price, "", new { @class = "text-danger" }) +
+
+ +
+ @Html.LabelFor(model => model.product.Category, htmlAttributes: new { @class = "control-label col-md-2" }) +
+ @Html.DropDownListFor(model => model.product.Category, new SelectList(Model.ProductCategories,"Category","Category"), new { htmlAttributes = new { @class = "form-control" } } ) +
+
+ +
+ @Html.LabelFor(model => model.product.Image, htmlAttributes: new { @class = "control-label col-md-2" }) +
+ @Html.EditorFor(model => model.product.Image, new { htmlAttributes = new { @class = "form-control" } }) + @Html.ValidationMessageFor(model => model.product.Image, "", new { @class = "text-danger" }) +
+
+ +
+
+ +
+
+
+} + +
+ @Html.ActionLink("Back to List", "Index") +
+ +@section Scripts { + @Scripts.Render("~/bundles/jqueryval") +} diff --git a/MyShop/MyShop.WebUI/Views/ProductManager/Delete.cshtml b/MyShop/MyShop.WebUI/Views/ProductManager/Delete.cshtml new file mode 100644 index 0000000..a39ab88 --- /dev/null +++ b/MyShop/MyShop.WebUI/Views/ProductManager/Delete.cshtml @@ -0,0 +1,64 @@ +@model MyShop.Core.Models.Product + +@{ + ViewBag.Title = "Delete"; +} + +

Delete

+ +

Are you sure you want to delete this?

+
+

Product

+
+
+
+ @Html.DisplayNameFor(model => model.Name) +
+ +
+ @Html.DisplayFor(model => model.Name) +
+ +
+ @Html.DisplayNameFor(model => model.Description) +
+ +
+ @Html.DisplayFor(model => model.Description) +
+ +
+ @Html.DisplayNameFor(model => model.Price) +
+ +
+ @Html.DisplayFor(model => model.Price) +
+ +
+ @Html.DisplayNameFor(model => model.Category) +
+ +
+ @Html.DisplayFor(model => model.Category) +
+ +
+ @Html.DisplayNameFor(model => model.Image) +
+ +
+ @Html.DisplayFor(model => model.Image) +
+ +
+ + @using (Html.BeginForm()) { + @Html.AntiForgeryToken() + +
+ | + @Html.ActionLink("Back to List", "Index") +
+ } +
diff --git a/MyShop/MyShop.WebUI/Views/ProductManager/Edit.cshtml b/MyShop/MyShop.WebUI/Views/ProductManager/Edit.cshtml new file mode 100644 index 0000000..bc85f4f --- /dev/null +++ b/MyShop/MyShop.WebUI/Views/ProductManager/Edit.cshtml @@ -0,0 +1,73 @@ +@model MyShop.Core.ViewModels.ProductManagerViewModel + +@{ + ViewBag.Title = "Edit"; +} + +

Edit

+ + +@using (Html.BeginForm()) +{ + @Html.AntiForgeryToken() + +
+

Product

+
+ @Html.ValidationSummary(true, "", new { @class = "text-danger" }) + @Html.HiddenFor(model => model.product.Id) + +
+ @Html.LabelFor(model => model.product.Name, htmlAttributes: new { @class = "control-label col-md-2" }) +
+ @Html.EditorFor(model => model.product.Name, new { htmlAttributes = new { @class = "form-control" } }) + @Html.ValidationMessageFor(model => model.product.Name, "", new { @class = "text-danger" }) +
+
+ +
+ @Html.LabelFor(model => model.product.Description, htmlAttributes: new { @class = "control-label col-md-2" }) +
+ @Html.EditorFor(model => model.product.Description, new { htmlAttributes = new { @class = "form-control" } }) + @Html.ValidationMessageFor(model => model.product.Description, "", new { @class = "text-danger" }) +
+
+ +
+ @Html.LabelFor(model => model.product.Price, htmlAttributes: new { @class = "control-label col-md-2" }) +
+ @Html.EditorFor(model => model.product.Price, new { htmlAttributes = new { @class = "form-control" } }) + @Html.ValidationMessageFor(model => model.product.Price, "", new { @class = "text-danger" }) +
+
+ +
+ @Html.LabelFor(model => model.product.Category, htmlAttributes: new { @class = "control-label col-md-2" }) +
+ @Html.DropDownListFor(model => model.product.Category, new SelectList(Model.ProductCategories, "Category", "Category"), new { htmlAttributes = new { @class = "form-control" } }) +
+
+ +
+ @Html.LabelFor(model => model.product.Image, htmlAttributes: new { @class = "control-label col-md-2" }) +
+ @Html.EditorFor(model => model.product.Image, new { htmlAttributes = new { @class = "form-control" } }) + @Html.ValidationMessageFor(model => model.product.Image, "", new { @class = "text-danger" }) +
+
+ +
+
+ +
+
+
+} + +
+ @Html.ActionLink("Back to List", "Index") +
+ +@section Scripts { + @Scripts.Render("~/bundles/jqueryval") +} diff --git a/MyShop/MyShop.WebUI/Views/ProductManager/Index.cshtml b/MyShop/MyShop.WebUI/Views/ProductManager/Index.cshtml new file mode 100644 index 0000000..e8d46e8 --- /dev/null +++ b/MyShop/MyShop.WebUI/Views/ProductManager/Index.cshtml @@ -0,0 +1,56 @@ +@model IEnumerable + +@{ + ViewBag.Title = "Index"; +} + +

Index

+ +

+ @Html.ActionLink("Create New", "Create") +

+ + + + + + + + + + +@foreach (var item in Model) { + + + + + + + + +} + +
+ @Html.DisplayNameFor(model => model.Name) + + @Html.DisplayNameFor(model => model.Description) + + @Html.DisplayNameFor(model => model.Price) + + @Html.DisplayNameFor(model => model.Category) + + @Html.DisplayNameFor(model => model.Image) +
+ @Html.DisplayFor(modelItem => item.Name) + + @Html.DisplayFor(modelItem => item.Description) + + @Html.DisplayFor(modelItem => item.Price) + + @Html.DisplayFor(modelItem => item.Category) + + @Html.DisplayFor(modelItem => item.Image) + + @Html.ActionLink("Edit", "Edit", new { id=item.Id }) | + @Html.ActionLink("Delete", "Delete", new { id=item.Id }) +
diff --git a/MyShop/MyShop.WebUI/Views/Shared/_Layout.cshtml b/MyShop/MyShop.WebUI/Views/Shared/_Layout.cshtml index ae31cd1..3660c31 100644 --- a/MyShop/MyShop.WebUI/Views/Shared/_Layout.cshtml +++ b/MyShop/MyShop.WebUI/Views/Shared/_Layout.cshtml @@ -22,8 +22,8 @@