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