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