public async Task <IActionResult> OnGetAsync(Guid?id) { if (id == null) { return(NotFound()); } SizeOfBoots = await _context.SizeOfBoots .Include(s => s.Model).FirstOrDefaultAsync(m => m.Id == id); if (SizeOfBoots == null) { return(NotFound()); } return(Page()); }
public async Task <IActionResult> OnPostAsync(Guid?id) { if (id == null) { return(NotFound()); } SizeOfBoots = await _context.SizeOfBoots.FindAsync(id); if (SizeOfBoots != null) { _context.SizeOfBoots.Remove(SizeOfBoots); await _context.SaveChangesAsync(); } return(RedirectToPage("./Index")); }
public async Task <IActionResult> OnGetAsync(Guid?id) { if (id == null) { return(NotFound()); } SizeOfBoots = await _context.SizeOfBoots .Include(s => s.Model).FirstOrDefaultAsync(m => m.Id == id); if (SizeOfBoots == null) { return(NotFound()); } ViewData["ModelId"] = new SelectList(_context.BootsModel, "Id", "Name"); return(Page()); }