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