public ActionResult Details(Guid?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Results results = resultsRepository.GetById(id); if (results == null) { return(HttpNotFound()); } return(View(results)); }