public async Task <IActionResult> OnGetAsync(int?id) { if (id == null) { return(NotFound()); } PhoneBook = await _context.PhoneBook.FirstOrDefaultAsync(m => m.ID == id); if (PhoneBook == null) { return(NotFound()); } ViewData["GroupingID"] = new SelectList(_context.Set <Grouping>(), "ID", "GroupingName"); return(Page()); }
public IActionResult OnGet() { ViewData["GroupingID"] = new SelectList(_context.Set <Grouping>(), "ID", "GroupingName"); return(Page()); }