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