public ActionResult Detalhes(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Tarefa tarefa = _tarefaRepository.Pesquisar(id); if (tarefa == null) { return(HttpNotFound()); } return(View(tarefa)); }