public async Task <IActionResult> OnGetAsync(Guid id) { var spec = new StudentWithCourseAndExamSpecification(id); Student = await _service.GetModelWithSpec(spec); if (Student == null) { return(NotFound()); } return(Page()); }
public async Task <IActionResult> OnPostAsync(Guid id) { var spec = new StudentWithCourseAndExamSpecification(id); Student = await _service.GetModelWithSpec(spec); if (Student != null) { await _service.DeleteAsync(Student); } return(RedirectToPage("./Index")); }