示例#1
0
 public IActionResult Delete(Student student)
 {
     try
     {
         studentDataAccessLayer.DeleteStudent(student.Id);
         return(RedirectToAction(nameof(Index)));
     }
     catch
     {
         return(View());
     }
 }
示例#2
0
 public ActionResult Delete(Student student)
 {
     try
     {
         // TODO: Add delete logic here
         studentDataAccessLayer.DeleteStudent(student.Id);
         return(RedirectToAction(nameof(Index)));
     }
     catch
     {
         return(View());
     }
 }
 public void Delete(int id)
 {
     sdal.DeleteStudent(id);
 }
        public ActionResult confirmDelete(int?id)
        {
            objStudent.DeleteStudent(id);

            return(RedirectToAction("Index"));
        }
示例#5
0
 public ActionResult DeleteConfirmed(int?id)
 {
     objstudent.DeleteStudent(id);
     return(RedirectToAction("Index"));
 }
示例#6
0
 public int Delete(int id)
 {
     return(objStudent.DeleteStudent(id));
 }