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

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

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