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