Exemplo n.º 1
0
        public IActionResult ConsultarCPF(string cpf)
        {
            try
            {
                var aluno = _alunoRepositorio.ConsultarCPF(cpf);

                if (aluno == null)
                {
                    return(NotFound(new { mensagem = "Aluno não encontrado" }));
                }

                return(Ok(aluno));
            }catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
        }