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