public IActionResult PesquisarTodosAnuncios()
        {
            var anuncios = _anuncioBusiness.FindAll();

            if (anuncios == null || anuncios.Count == 0)
            {
                return(NotFound("Anuncios não Encontrados"));
            }
            return(Ok(_anuncioBusiness.FindAll()));
        }
Example #2
0
 public IActionResult Get()
 {
     try
     {
         return(new OkObjectResult(_anuncioBusiness.FindAll()));
     }
     catch (Exception ex)
     {
         return(BadRequest(ex.ToString()));
     }
 }