Exemplo n.º 1
0
        /// <summary>
        /// MÉTODO RESPONSÁVEL POR RETORNAR O CADASTRO DO ALUNO
        /// </summary>
        /// <param name="IDAluno">ID DO ALUNO</param>
        /// <returns>OBJETO ALUNO</returns>
        public async Task <Aluno> GetAlunoAsync(int IDAluno)
        {
            //VERIFICAR SE OS DADOS QUE SERÃO CONSTRUÍDOS ESTÃO OK
            new Aluno(0, "", "", "", ' ', ' ');

            return(await _alunoRepository.GetAlunoAsync(IDAluno));
        }
Exemplo n.º 2
0
        public async Task <Aluno> GetAlunoAsync(string name)
        {
            try
            {
                if (string.IsNullOrEmpty(name))
                {
                    throw new Exception("Preencha o nome do aluno");
                }

                return(await _alunoRepository.GetAlunoAsync(name));
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }