public ActionResult DeleteConfirmed(int id) { HologramaJedi hologramaJedi = db.HologramaJedi.Find(id); db.HologramaJedi.Remove(hologramaJedi); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Id,idHolograma,idJedi")] HologramaJedi hologramaJedi) { if (ModelState.IsValid) { db.Entry(hologramaJedi).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.idHolograma = new SelectList(db.Holograma, "Id", "Nombre", hologramaJedi.idHolograma); ViewBag.idJedi = new SelectList(db.Jedis, "Id", "Nombre", hologramaJedi.idJedi); return(View(hologramaJedi)); }
public ActionResult Create([Bind(Include = "idHolograma,idJedi")] HologramaJedi hologramaJedi) { if (ModelState.IsValid) { db.HologramaJedi.Add(hologramaJedi); db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.idHolograma = new SelectList(db.Holograma, "Id", "Nombre", hologramaJedi.idHolograma); ViewBag.idJedi = new SelectList(db.Jedis, "Id", "Nombre", hologramaJedi.idJedi); return(View(hologramaJedi)); }
// GET: HologramaJedis/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } HologramaJedi hologramaJedi = db.HologramaJedi.Find(id); if (hologramaJedi == null) { return(HttpNotFound()); } return(View(hologramaJedi)); }
// GET: HologramaJedis/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } HologramaJedi hologramaJedi = db.HologramaJedi.Find(id); if (hologramaJedi == null) { return(HttpNotFound()); } ViewBag.idHolograma = new SelectList(db.Holograma, "Id", "Nombre", hologramaJedi.idHolograma); ViewBag.idJedi = new SelectList(db.Jedis, "Id", "Nombre", hologramaJedi.idJedi); return(View(hologramaJedi)); }