Exemple #1
0
 public async Task <IActionResult> OnPostDelete(string id)
 {
     Courses = B_Course.CourseById(id);
     if (Courses == null)
     {
         return(NotFound());
     }
     B_Course.DeleteCourse(Courses);
     Message = "Delete successful 😎";
     return(RedirectToPage("Index"));
 }
Exemple #2
0
 public async Task OnGet(string id)
 {
     Course = B_Course.CourseById(id);
 }