public ActionResult DeleteConfirmed(int id)
 {
     TherapyPlanHistory therapyPlanHistory = db.TherapyPlanHistories.Find(id);
     db.TherapyPlanHistories.Remove(therapyPlanHistory);
     db.SaveChanges();
     return RedirectToAction("Index");
 }
 public ActionResult Edit([Bind(Include = "Id,TherapyPlanId,Property,OldValue,NewValue,Changed,UserId")] TherapyPlanHistory therapyPlanHistory)
 {
     if (ModelState.IsValid)
     {
         db.Entry(therapyPlanHistory).State = EntityState.Modified;
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     ViewBag.TherapyPlanId = new SelectList(db.Plans, "Id", "Name", therapyPlanHistory.TherapyPlanId);
     ViewBag.UserId = new SelectList(db.Users, "Id", "FirstName", therapyPlanHistory.UserId);
     return View(therapyPlanHistory);
 }
 // GET: TherapyPlanHistories/Details/5
 public ActionResult Details(int? id)
 {
     if (id == null)
     {
         return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
     }
     TherapyPlanHistory therapyPlanHistory = db.TherapyPlanHistories.Find(id);
     if (therapyPlanHistory == null)
     {
         return HttpNotFound();
     }
     return View(therapyPlanHistory);
 }
 // GET: TherapyPlanHistories/Edit/5
 public ActionResult Edit(int? id)
 {
     if (id == null)
     {
         return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
     }
     TherapyPlanHistory therapyPlanHistory = db.TherapyPlanHistories.Find(id);
     if (therapyPlanHistory == null)
     {
         return HttpNotFound();
     }
     ViewBag.TherapyPlanId = new SelectList(db.Plans, "Id", "Name", therapyPlanHistory.TherapyPlanId);
     ViewBag.UserId = new SelectList(db.Users, "Id", "FirstName", therapyPlanHistory.UserId);
     return View(therapyPlanHistory);
 }