public ActionResult DeleteConfirmed(long id) { TipoIdentifiacion tipoIdentifiacion = db.TipoIdentifiacion.Find(id); db.TipoIdentifiacion.Remove(tipoIdentifiacion); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Id,Nombre")] TipoIdentifiacion tipoIdentifiacion) { if (ModelState.IsValid) { db.Entry(tipoIdentifiacion).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(tipoIdentifiacion)); }
public ActionResult Create([Bind(Include = "Id,Nombre")] TipoIdentifiacion tipoIdentifiacion) { if (ModelState.IsValid) { db.TipoIdentifiacion.Add(tipoIdentifiacion); db.SaveChanges(); return(RedirectToAction("Index")); } return(View("/Views/Administrativas/TipoIdentifiacions/Create.cshtml", tipoIdentifiacion)); }
// GET: TipoIdentifiacions/Delete/5 public ActionResult Delete(long?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } TipoIdentifiacion tipoIdentifiacion = db.TipoIdentifiacion.Find(id); if (tipoIdentifiacion == null) { return(HttpNotFound()); } return(View("/Views/Administrativas/TipoIdentifiacions/Delete.cshtml", tipoIdentifiacion)); }