// GET: Anuncios/Details/5 public ActionResult Details(int?id) { if (id == null) { return(NotFound()); } var eventoViewModel = context.ObterPorId(id.Value); if (eventoViewModel == null) { return(NotFound()); } return(View(eventoViewModel)); }