public async Task <ActionResult> DeleteDepartment(int id) { if (ModelState.IsValid) { var major = await InstitutionManager.FindDepartmentByIdAsync(id); if (major != null) { await InstitutionManager.DeleteDepartmentAsync(major); } } return(RedirectToAction("AllDepartment")); }