public IActionResult DeleteStudent(int studentId = 0) { StudentViewModel svm = new StudentViewModel(); svm.DeleteStudent(studentId); return(RedirectToAction("Index", "Site")); }
public IActionResult Delete(Guid?id) { if (id.HasValue) { return(View(StudentViewModel.DeleteStudent(_repository, (Guid)id))); } return(NotFound()); }