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