public ActionResult DeleteConfirmed(int?id) { tipolinea tipolinea = _UnityOfWork.tipolinea1.Get(id); _UnityOfWork.tipolinea1.Delete(tipolinea); _UnityOfWork.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "tipolinea_id,tipolinea_nombre")] tipolinea tipolinea) { if (ModelState.IsValid) { //_UnityOfWork.Entry(tipolinea).State = EntityState.Modified; _UnityOfWork.StateModified(tipolinea); _UnityOfWork.SaveChanges(); return(RedirectToAction("Index")); } return(View(tipolinea)); }
public ActionResult Create([Bind(Include = "tipolinea_id,tipolinea_nombre")] tipolinea tipolinea) { if (ModelState.IsValid) { _UnityOfWork.tipolinea1.Add(tipolinea); _UnityOfWork.SaveChanges(); return(RedirectToAction("Index")); } return(View(tipolinea)); }
// GET: tipolineas/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } tipolinea tipolinea = _UnityOfWork.tipolinea1.Get(id); if (tipolinea == null) { return(HttpNotFound()); } return(View(tipolinea)); }