// GET: Anuncios/Delete/5 public async Task <IActionResult> Delete(int?id) { if (id == null) { return(NotFound()); } var anuncio = await _anuncioRepository.BuscarAnuncioPorId(id); if (anuncio == null) { return(NotFound()); } return(View(anuncio)); }