public ActionResult Create(AlertaIncidente alerta) { if (ModelState.IsValid) { db.AlertasIncidente.Add(alerta); db.SaveChanges(); return RedirectToAction("Index"); } return View(alerta); }
public ActionResult Edit(AlertaIncidente alerta) { if (ModelState.IsValid) { db.AlertasIncidente.Attach(alerta); db.Entry(alerta).State = EntityState.Modified; return RedirectToAction("Index"); } return View(alerta); }