public ActionResult Delete(int StudentId) { StudentDetails studentDetails = new StudentDetails(); studentDetails.Id = StudentId; StudentBusinessLayer studentBusinessLayer = new StudentBusinessLayer(); studentBusinessLayer.DeleteStudent(studentDetails); return(RedirectToAction("Index")); }
public ActionResult DeleteConfirmed(int?id) { stuBL.DeleteStudent(id.Value); return(RedirectToAction("Index")); }