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