public async Task <IActionResult> OnGetAsync(int?id) { if (id == null) { return(NotFound()); } DeviceComplexityRate = await _context.DeviceComplexityRates .Include(d => d.DeviceComposition) .Include(d => d.DeviceCountRange).FirstOrDefaultAsync(m => m.ID == id); if (DeviceComplexityRate == null) { return(NotFound()); } ViewData["DeviceCompositionID"] = new SelectList(_context.DeviceCompositions, "ID", "Name"); ViewData["DeviceCountRangeID"] = new SelectList(_context.Set <DeviceCountRange>(), "ID", "Name"); return(Page()); }
public IActionResult OnGet() { ViewData["DeviceCompositionID"] = new SelectList(_context.DeviceCompositions, "ID", "Name"); ViewData["DeviceCountRangeID"] = new SelectList(_context.Set <DeviceCountRange>(), "ID", "Name"); return(Page()); }