// GET: Works/Details/5 public async Task <ActionResult> Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } var work = await _workService.FindAsync(id); if (work == null) { return(HttpNotFound()); } return(View(work)); }