// GET: Hardware/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } HardwareViewModel hardware = _hardwareService.FindById(id.Value); if (hardware == null) { return(HttpNotFound()); } return(View(hardware)); }
// GET: Hardware/Details/ public IActionResult Details(long?id) { if (id == null) { return(NotFound()); } Hardware hardware = service.FindById(id.Value); if (hardware == null) { return(NotFound()); } return(View(hardware)); }