public async Task <IActionResult> OnGetAsync(int?id) { if (id == null) { return(NotFound()); } MathHack = await _context.MathHack .Include(m => m.Industry).FirstOrDefaultAsync(m => m.Id == id); if (MathHack == null) { return(NotFound()); } ViewData["IndustryId"] = new SelectList(_context.Set <Industry>(), "Id", "Name"); return(Page()); }
public IActionResult OnGet() { ViewData["IndustryId"] = new SelectList(_context.Set <Industry>(), "Id", "Name"); return(Page()); }