public ActionResult DeleteConfirmed(int id) { Models.CareProvider careProvider = db.CareProviders.Find(id); db.CareProviders.Remove(careProvider); db.SaveChanges(); return(RedirectToAction("Index")); }
//=============================================================================== // GET: CareProviders/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Models.CareProvider careProvider = db.CareProviders.Find(id); if (careProvider == null) { return(HttpNotFound()); } return(View(careProvider)); }