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

            Candy = await _context.Candy
                    .Include(c => c.CandStore).FirstOrDefaultAsync(m => m.CID == id);

            if (Candy == null)
            {
                return(NotFound());
            }
            ViewData["CSID"] = new SelectList(_context.Set <CandyStore>(), "CSID", "CSID");
            return(Page());
        }
Esempio n. 2
0
 public IActionResult OnGet()
 {
     ViewData["CSID"] = new SelectList(_context.Set <CandyStore>(), "CSID", "CSID");
     return(Page());
 }