public IActionResult Get(int id) { try { Categoria categoria = _categoriaRepository.BuscarID(id); if (categoria == null) { return(NotFound()); } return(Ok(categoria)); } catch (Exception ex) { throw new Exception(ex.Message); } }