示例#1
0
        //[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());
        }
示例#2
0
        public async Task <ActionResult> DeleteGrade(int id)
        {
            await _grade.Delete(id);

            return(NoContent());
        }