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