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