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