コード例 #1
0
        public async Task <IActionResult> obterpergunta(int Id)
        {
            try{
                var results = await _perguntaRepositorio.ObterProximaPergunta(Id);

                var result = _mapper.Map <PerguntaDto>(results);
                return(Ok(result));
            }
            catch (System.Exception)
            {
                return(this.StatusCode(StatusCodes.Status500InternalServerError, "Banco de Dados Falou"));
            }
        }