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

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

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