public ActionResult Update(Articolo model) { if (ModelState.IsValid) { _oArticoloRepo.Update(model); this.DatabaseFactory.GetContext().SaveChanges(); } return RedirectToAction("Index"); }
public ActionResult Delete(Articolo model) { if (model != null && ModelState.IsValid) { // Aggiorno l'operazione Articolo oArticolo = _oArticoloRepo.GetEdit().SingleOrDefault(x => x.ID == model.ID); if (oArticolo != null) _oArticoloRepo.Delete(oArticolo); } this.DatabaseFactory.GetContext().SaveChanges(); return RedirectToAction("Index"); }
public ActionResult Create() { Articolo oArticolo = new Articolo(); return View(oArticolo); }