public IActionResult Edit(long?id, long?assetID) { if (id == null) { return(NotFound()); } HardwareViewModel hardware = service.loadHardwareViewModel(id.Value); if (hardware == null) { return(NotFound()); } ProductTypeDropDown(hardware.hardware.ProductTypeID); StatusDropDown(hardware.hardware.StatusID); //ViewData["ProductTypeID"] = new List<SelectListItem>(service.GetSelectListProductTypeHardware()); ViewData["assetID"] = assetID; return(View(hardware)); }