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