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

            return(NoContent());
        }