public ActionResult Delete(int id, Course collection) { try { _Courseobj.Remove(id); _Courseobj.Save(); return(RedirectToAction("Index")); } catch { return(View()); } }
public ActionResult Delete(int id, Course collection) //delete method to get the detail of the data with specific id { try { Cobj.Remove(id); Cobj.save(); return(RedirectToAction("Index")); } catch { return(View()); } }
public ActionResult Delete(int id, Enrollment collection) { try { Eobj.Remove(id); Eobj.save(); return(RedirectToAction("Index")); } catch { return(View()); } }
public ActionResult Delete(int id, Student collection) //delete method to get the detail of the data with specific id { try { // TODO: Add delete logic here Sobj.Remove(id); Sobj.save(); return(RedirectToAction("Index")); } catch { return(View()); } }