public async Task <IActionResult> OnGetAsync(int?id) { if (id == null) { return(NotFound()); } applicant1 = await _context.applicant1.FirstOrDefaultAsync(m => m.applicantID == id); if (applicant1 == null) { return(NotFound()); } return(Page()); }
public async Task <IActionResult> OnPostAsync(int?id) { if (id == null) { return(NotFound()); } applicant1 = await _context.applicant1.FindAsync(id); if (applicant1 != null) { _context.applicant1.Remove(applicant1); await _context.SaveChangesAsync(); } return(RedirectToPage("./Index")); }