public ActionResult DeleteConfirmed(int id) { TorpederoM torpederoM = db.TorpederoM.Find(id); db.TorpederoM.Remove(torpederoM); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "ID,Nombre,Precio,Movimiento,PotenciaFuego,Blindaje,Valor")] TorpederoM torpederoM) { if (ModelState.IsValid) { db.Entry(torpederoM).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(torpederoM)); }
public ActionResult Create([Bind(Include = "ID,Nombre,Precio,Movimiento,PotenciaFuego,Blindaje,Valor")] TorpederoM torpederoM) { if (ModelState.IsValid) { db.TorpederoM.Add(torpederoM); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(torpederoM)); }
// GET: TorpederoM/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } TorpederoM torpederoM = db.TorpederoM.Find(id); if (torpederoM == null) { return(HttpNotFound()); } return(View(torpederoM)); }