示例#1
0
        public async Task <IActionResult> OnGetAsync(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            Publisher = await _context.Publisher.FirstOrDefaultAsync(m => m.ID == id);

            if (Publisher == null)
            {
                return(NotFound());
            }
            ViewData["PublisherID"] = new SelectList(_context.Set <Publisher>(), "ID", "PublisherName");
            return(Page());
        }
示例#2
0
 public IActionResult OnGet()
 {
     ViewData["PublisherID"] = new SelectList(_context.Set <Publisher>(), "ID", "PublisherName");
     return(Page());
 }