public ActionResult DeleteConfirmed(int id) { Tbl_Bens tbl_Bens = db.Tbl_Bens.Find(id); db.Tbl_Bens.Remove(tbl_Bens); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "id,renavam,chassi,placa")] Tbl_Bens tbl_Bens) { if (ModelState.IsValid) { db.Entry(tbl_Bens).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(tbl_Bens)); }
public ActionResult Create([Bind(Include = "id,renavam,chassi,placa")] Tbl_Bens tbl_Bens) { if (ModelState.IsValid) { db.Tbl_Bens.Add(tbl_Bens); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(tbl_Bens)); }
// GET: Tbl_Bens/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Tbl_Bens tbl_Bens = db.Tbl_Bens.Find(id); if (tbl_Bens == null) { return(HttpNotFound()); } return(View(tbl_Bens)); }