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