Esempio n. 1
0
        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());
        }
Esempio n. 2
0
 public IActionResult OnGet()
 {
     ViewData["IndustryId"] = new SelectList(_context.Set <Industry>(), "Id", "Name");
     return(Page());
 }