public async Task <IActionResult> OnGetAsync(int?id) { if (id == null) { return(NotFound()); } PizzaOrder = await _context.PizzaOrder .Include(p => p.Order) .Include(p => p.Pizza).FirstOrDefaultAsync(m => m.PizzaOrderId == id); if (PizzaOrder == null) { return(NotFound()); } ViewData["OrderNumber"] = new SelectList(_context.Order, "OrderNumber", "OrderNumber"); ViewData["PizzaCode"] = new SelectList(_context.Set <Pizza>(), "PizzaCode", "PizzaCode"); return(Page()); }
public IActionResult OnGet() { ViewData["OrderNumber"] = new SelectList(_context.Order, "OrderNumber", "OrderNumber"); ViewData["PizzaCode"] = new SelectList(_context.Set <Pizza>(), "PizzaCode", "PizzaCode"); return(Page()); }