public ActionResult Detalhe(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Item item = _item.Detalhe(id.Value); if (item == null) { return(HttpNotFound()); } return(View("Detalhe", item)); }