public ActionResult DeleteConfirmed(int id) { CurrentClassLocation currentclasslocation = db.CurrentClassLocations.Find(id); db.CurrentClassLocations.Remove(currentclasslocation); db.SaveChanges(); return(RedirectToAction("Index")); }
// // GET: /CurrentClassLocation/Delete/5 public ActionResult Delete(int id = 0) { CurrentClassLocation currentclasslocation = db.CurrentClassLocations.Find(id); if (currentclasslocation == null) { return(HttpNotFound()); } return(View(currentclasslocation)); }
public ActionResult Edit(CurrentClassLocation currentclasslocation) { if (ModelState.IsValid) { db.Entry(currentclasslocation).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(currentclasslocation)); }
public ActionResult Create(CurrentClassLocation currentclasslocation) { if (ModelState.IsValid) { db.CurrentClassLocations.Add(currentclasslocation); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(currentclasslocation)); }