public async Task <ActionResult> Delete(int id) { if (ModelState.IsValid) { var major = await InstitutionManager.FindMajorByIdAsync(id); if (major != null) { await InstitutionManager.DeleteMajorAsync(major); } } return(RedirectToAction("AllMajor")); }