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