public ActionResult DeleteConfirmed(int id) { CombustibleYLubricante combustibleYLubricante = db.CombustibleYLubricantes.Find(id); db.CombustibleYLubricantes.Remove(combustibleYLubricante); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "CombustibleId,TipoDeCombustibleId,MarcaId,Descripcion")] CombustibleYLubricante combustibleYLubricante) { if (ModelState.IsValid) { db.Entry(combustibleYLubricante).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(combustibleYLubricante)); }
public ActionResult Create([Bind(Include = "CombustibleId,TipoDeCombustibleId,MarcaId,Descripcion")] CombustibleYLubricante combustibleYLubricante) { if (ModelState.IsValid) { db.CombustibleYLubricantes.Add(combustibleYLubricante); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(combustibleYLubricante)); }
// GET: CombustiblesYLubricantes/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } CombustibleYLubricante combustibleYLubricante = db.CombustibleYLubricantes.Find(id); if (combustibleYLubricante == null) { return(HttpNotFound()); } return(View(combustibleYLubricante)); }