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