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