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