Example #1
0
        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());
        }
Example #2
0
        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());
        }
Example #3
0
        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());
        }
Example #4
0
 public IActionResult OnGet()
 {
     ViewData["ManufacturerID"] = new SelectList(_context.Set <Manufacturer>(), "ID", "PublisherName");
     return(Page());
 }
Example #5
0
 public async Task OnGetAsync()
 {
     ViewData["CountryId"] = new SelectList(_context.Set <Country>(), "Id", "Name");
     Athlete = await _context.Athlete
               .Include(a => a.Country).ToListAsync();
 }
Example #6
0
 public IActionResult OnGet()
 {
     ViewData["CountryId"] = new SelectList(_context.Set <Country>(), "Id", "Name");
     return(Page());
 }
Example #7
0
 public IActionResult OnGet()
 {
     ViewData["NationalityID"] = new SelectList(_context.Set <Country>(), "ID", "ID");
     return(Page());
 }