From 46a38ade0d7801d456dc27d05ceb2dc9d47d84cd Mon Sep 17 00:00:00 2001 From: jmalatia Date: Sun, 5 Jul 2015 12:59:03 -0500 Subject: [PATCH 1/2] Update Item.cs Remove `[Bind(Exclude = "ID")]` Causing Items/Edit to throw an error because ID is not bound. --- OpenOrderFramework/Models/Item.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OpenOrderFramework/Models/Item.cs b/OpenOrderFramework/Models/Item.cs index c2efe8d..aff7fb6 100644 --- a/OpenOrderFramework/Models/Item.cs +++ b/OpenOrderFramework/Models/Item.cs @@ -11,7 +11,7 @@ namespace OpenOrderFramework.Models { - [Bind(Exclude = "ID")] + public class Item { private static NLog.Logger logger = NLog.LogManager.GetCurrentClassLogger(); @@ -72,4 +72,4 @@ public HttpPostedFileBase File public virtual Catagorie Catagorie { get; set; } public virtual List OrderDetails { get; set; } } -} \ No newline at end of file +} From 68ec3f2c5cc7b2a23a49a441fefb6053926277a7 Mon Sep 17 00:00:00 2001 From: jmalatia Date: Sun, 5 Jul 2015 13:00:56 -0500 Subject: [PATCH 2/2] Update Index.cshtml Should be `item.Item.ID` not just `item.ID --- OpenOrderFramework/Views/ShoppingCart/Index.cshtml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OpenOrderFramework/Views/ShoppingCart/Index.cshtml b/OpenOrderFramework/Views/ShoppingCart/Index.cshtml index 4664489..5f8ccd8 100644 --- a/OpenOrderFramework/Views/ShoppingCart/Index.cshtml +++ b/OpenOrderFramework/Views/ShoppingCart/Index.cshtml @@ -64,7 +64,7 @@ { - @Html.ActionLink(item.Item.Name, "Details", "Store", new { id = item.ID }, null) + @Html.ActionLink(item.Item.Name, "Details", "Store", new { id = item.Item.ID }, null) @item.Item.Price @@ -106,4 +106,4 @@

} -} \ No newline at end of file +}