Esempio n. 1
0
        public IActionResult GetPadrao()
        {
            try
            {
                IEnumerable <ControleEmprestimoJogoDTO> controleEmprestimoJogos =
                    ControleEmprestimoJogoAdapter.ControleEmprestimoJogoToDTOs(_controleEmprestimoJogoRepositorio.SelecionarComRelacionamento());

                return(Ok(controleEmprestimoJogos));
            }
            catch (Exception ex)
            {
                return(BadRequest(ex));
            }
        }
Esempio n. 2
0
        public IActionResult Get()
        {
            try
            {
                IEnumerable <ControleEmprestimoJogoDTO> controleEmprestimoJogos =
                    ControleEmprestimoJogoAdapter.ControleEmprestimoJogoToDTOs(_controleEmprestimoJogoRepositorio.SelecionarTodosJogosComUltimoControleEmprestimo(), false);

                return(Ok(controleEmprestimoJogos));
            }
            catch (Exception ex)
            {
                return(BadRequest(ex));
            }
        }