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