public ActionResult DeleteConfirmed(int id) { RaceResultType raceResultType = db.RaceResultTypes.Find(id); db.RaceResultTypes.Remove(raceResultType); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "ResultTypeId,ResultTypeName")] RaceResultType raceResultType) { if (ModelState.IsValid) { db.Entry(raceResultType).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(raceResultType)); }
public ActionResult Create([Bind(Include = "ResultTypeId,ResultTypeName")] RaceResultType raceResultType) { if (ModelState.IsValid) { db.RaceResultTypes.Add(raceResultType); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(raceResultType)); }
public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } RaceResultType raceResultType = db.RaceResultTypes.Find(id); if (raceResultType == null) { return(HttpNotFound()); } return(View(raceResultType)); }