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