public async Task <IActionResult> OnGetAsync(int?id) { if (id == null) { return(NotFound()); } Athlete = await _context.Athlete .Include(a => a.Country).FirstOrDefaultAsync(m => m.Id == id); if (Athlete == null) { return(NotFound()); } ViewData["CountryId"] = new SelectList(_context.Set <Country>(), "Id", "Name"); return(Page()); }
public async Task <IActionResult> OnGetAsync(int?id) { if (id == null) { return(NotFound()); } Collectible = await _context.Collectible .Include(c => c.Manufacturer).FirstOrDefaultAsync(m => m.ID == id); if (Collectible == null) { return(NotFound()); } ViewData["ManufacturerID"] = new SelectList(_context.Set <Manufacturer>(), "ID", "PublisherName"); return(Page()); }
public async Task <IActionResult> OnGetAsync(int?id) { if (id == null) { return(NotFound()); } Destination = await _context.Destination .Include(d => d.Country).FirstOrDefaultAsync(m => m.id == id); if (Destination == null) { return(NotFound()); } ViewData["CountryID"] = new SelectList(_context.Set <Country>(), "Id", "Id"); return(Page()); }
public IActionResult OnGet() { ViewData["ManufacturerID"] = new SelectList(_context.Set <Manufacturer>(), "ID", "PublisherName"); return(Page()); }
public async Task OnGetAsync() { ViewData["CountryId"] = new SelectList(_context.Set <Country>(), "Id", "Name"); Athlete = await _context.Athlete .Include(a => a.Country).ToListAsync(); }
public IActionResult OnGet() { ViewData["CountryId"] = new SelectList(_context.Set <Country>(), "Id", "Name"); return(Page()); }
public IActionResult OnGet() { ViewData["NationalityID"] = new SelectList(_context.Set <Country>(), "ID", "ID"); return(Page()); }