Exemplo n.º 1
0
        public async Task <IActionResult> Get(int Id)
        {
            try
            {
                var results = await _repo.GetAlunosById(Id);

                if (results == null)
                {
                    return(NotFound(MSG.NaoExisteAluno));
                }
                return(Ok(results));
            }
            catch (Exception)
            {
                return(this.StatusCode(StatusCodes.Status501NotImplemented, MSG.BancoDadosFalhou));
            }
        }