Exemplo n.º 1
0
        public ObjectResult Get()
        {
            var podcasts = _podcastRepository.Listar();

            if (!podcasts.Any())
            {
                Response.StatusCode = StatusCodes.Status404NotFound;
                return(ResponseUtils.GenerateObjectResult("Nenhum podcast encontrado.", podcasts));
            }

            Response.StatusCode = StatusCodes.Status200OK;
            return(ResponseUtils.GenerateObjectResult("Listagem de Podcasts!", podcasts));
        }