예제 #1
0
        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());
        }
예제 #2
0
 public IActionResult OnGet()
 {
     ViewData["GroupingID"] = new SelectList(_context.Set <Grouping>(), "ID", "GroupingName");
     return(Page());
 }