public IActionResult ProductSubmit(StoreItem item) { if (ModelState.IsValid) { var oldItem = Db.StoreListings.Find(item.ID); if (oldItem != null) { oldItem = item; DB.Save(oldItem); } else { item.ID = Guid.NewGuid(); DB.Add(item); } } return(Redirect("CurrentStock")); }