public ActionResult DeleteConfirmed(int id) { FosterTable fosterTable = db.FosterTables.Find(id); db.FosterTables.Remove(fosterTable); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Family_ID,Foster_Family,Type_of_Home,Licensed_Beds,Occupied_Beds,Available_Beds,Min_Age,Max_Age,Preferred_Gender,Agency,POC,Comments")] FosterTable fosterTable) { if (ModelState.IsValid) { db.Entry(fosterTable).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(fosterTable)); }
//public ActionResult Index() //{ // return View(db.FosterTables.ToList()); //} // GET: FosterTables/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } FosterTable fosterTable = db.FosterTables.Find(id); if (fosterTable == null) { return(HttpNotFound()); } return(View(fosterTable)); }