public ActionResult DeleteConfirmed(int id) { Contextura contextura = db.Contexturas.Find(id); db.Contexturas.Remove(contextura); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Id,NombreContextura")] Contextura contextura) { if (ModelState.IsValid) { db.Entry(contextura).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(contextura)); }
public ActionResult Create([Bind(Include = "Id,NombreContextura")] Contextura contextura) { if (ModelState.IsValid) { db.Contexturas.Add(contextura); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(contextura)); }
// GET: Contexturas/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Contextura contextura = db.Contexturas.Find(id); if (contextura == null) { return(HttpNotFound()); } return(View(contextura)); }