public ActionResult DeleteConfirmed(int id) { HealthFactMilestone healthFactMilestone = db.HealthFactMilestones.Find(id); db.HealthFactMilestones.Remove(healthFactMilestone); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "ID,DaysIn,FactBody,ImageID")] HealthFactMilestone healthFactMilestone) { if (ModelState.IsValid) { db.Entry(healthFactMilestone).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(healthFactMilestone)); }
public ActionResult Create([Bind(Include = "ID,DaysIn,FactBody,ImageID")] HealthFactMilestone healthFactMilestone) { if (ModelState.IsValid) { db.HealthFactMilestones.Add(healthFactMilestone); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(healthFactMilestone)); }
// GET: HealthFactMilestones/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } HealthFactMilestone healthFactMilestone = db.HealthFactMilestones.Find(id); if (healthFactMilestone == null) { return(HttpNotFound()); } return(View(healthFactMilestone)); }