Example #1
0
        public IActionResult Get()
        {
            try
            {
                var perfils = _perfilRepository.LerTodos();

                if (perfils.Count == 0)
                {
                    return(NoContent());
                }

                return(Ok(perfils));
            }
            catch (Exception ex)
            {
                return(BadRequest(ex.Message));
            }
        }