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")); }
public async Task OnGet(string id) { Course = B_Course.CourseById(id); }