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