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