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

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

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