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