public IActionResult Index() { List <Models.Anuncio> cars = new List <Models.Anuncio>(); BD.Repo.Anuncio repo = new BD.Repo.Anuncio(); cars = repo.Consultar(); return(View(cars)); }
public bool Del(int id) { try { Models.Anuncio car = new Models.Anuncio(); BD.Repo.Anuncio repo = new BD.Repo.Anuncio(); car = repo.Consultar(id); repo.Remover(car); return(true); } catch (Exception) { return(false); } }