public async Task <IActionResult> OnGetAsync(int?id) { if (id == null) { return(NotFound()); } Product = await _context.Product .Include(p => p.Vendor).FirstOrDefaultAsync(m => m.Id == id); if (Product == null) { return(NotFound()); } ViewData["VendorId"] = new SelectList(_context.Set <Vendor>(), "Id", "VendorName"); return(Page()); }
public async Task <IActionResult> OnGetAsync(int?id) { if (id == null) { return(NotFound()); } Revenue = await _context.Revenue .Include(r => r.Product) .Include(r => r.StoreFront).FirstOrDefaultAsync(m => m.Id == id); if (Revenue == null) { return(NotFound()); } ViewData["ProductId"] = new SelectList(_context.Product, "Id", "Name"); ViewData["StoreFrontId"] = new SelectList(_context.Set <StoreFront>(), "Id", "StoreFrontName"); return(Page()); }
public IActionResult OnGet() { ViewData["VendorId"] = new SelectList(_context.Set <Vendor>(), "Id", "VendorName"); return(Page()); }
public IActionResult OnGet() { ViewData["ProductId"] = new SelectList(_context.Product, "Id", "Name"); ViewData["StoreFrontId"] = new SelectList(_context.Set <StoreFront>(), "Id", "StoreFrontName"); return(Page()); }