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

            Dogs = await _context.Dogs
                   .Include(d => d.PsID).FirstOrDefaultAsync(m => m.DID == id);

            if (Dogs == null)
            {
                return(NotFound());
            }
            ViewData["PSID"] = new SelectList(_context.Set <PetStore>(), "PSID", "PSID");
            return(Page());
        }
Beispiel #2
0
 public IActionResult OnGet()
 {
     ViewData["PSID"] = new SelectList(_context.Set <PetStore>(), "PSID", "PSID");
     return(Page());
 }