public ActionResult Create(EditStuffsViewModel stuff) { try { if (!ModelState.IsValid) return View(stuff); _stuffService.CreateStuff(_stuffMapper.StuffViewModelToStuff(stuff)); return RedirectToAction("Index"); } catch { return View(); } }
public ActionResult Delete(EditStuffsViewModel stuff) { try { _stuffService.DeleteStuff(stuff.Id); return RedirectToAction("Index"); } catch { return View(); } }