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