Exemplo n.º 1
0
        public async Task <IActionResult> OnGetAsync(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            Dinosaurs = await _context.Dinosaurs
                        .Include(d => d.ExhibitID).FirstOrDefaultAsync(m => m.DID == id);

            if (Dinosaurs == null)
            {
                return(NotFound());
            }
            ViewData["EID"] = new SelectList(_context.Set <Exhibits>(), "EID", "EID");
            return(Page());
        }
Exemplo n.º 2
0
 public IActionResult OnGet()
 {
     ViewData["EID"] = new SelectList(_context.Set <Exhibits>(), "EID", "EID");
     return(Page());
 }