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