Ejemplo n.º 1
0
        public async Task <IActionResult> Get()
        {
            try
            {
                var results = await _service.GetAllCategoriaAsync();

                return(Ok(results));
            }
            catch (Exception ex)
            {
                return(this.StatusCode(StatusCodes.Status500InternalServerError, "Banco de Dados falhou"));
            }
        }