public ActionResult Edit(VMCategoryInfo category) { if (ModelState.IsValid) { catDB.Update(category); return(RedirectToAction("Index")); } return(View(category)); }
public ActionResult Delete(long?ID) { if (ID == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } VMCategoryInfo model = catDB.Get(ID); if (model == null) { return(HttpNotFound()); } return(View(model)); }