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