//[HttpPost] public async Task <IActionResult> Delete(int id) { var deleteFaculty = await _faculty.Delete(id); if (deleteFaculty) { Alert("Faculty deleted successfully.", NotificationType.success); return(RedirectToAction("Index")); } Alert("Faculty not deleted!", NotificationType.error); return(View()); }