Exemplo n.º 1
0
        public async Task <IList <AlunoDto> > GetAluno()
        {
            var alunosRepository = await _alunoRepository.GetAll();

            var alunos = _mapper.Map <List <AlunoDto> >(alunosRepository);

            return(alunos);
        }
Exemplo n.º 2
0
        public IEnumerable <Aluno> GetAll(
            [FromServices] IAlunoRepository repository
            )
        {
            var user = User.Claims.FirstOrDefault(x => x.Type == "user_id")?.Value;

            return(repository.GetAll());
        }
 public IHttpActionResult GetAlunos()
 {
     try
     {
         return(Ok(_alunoRepository.GetAll()));
     }
     catch (Exception e)
     {
         return(BadRequest(e.Message));
     }
 }
Exemplo n.º 4
0
 public IEnumerable <Aluno> ObterAlunos()
 {
     return(repo.GetAll());
 }
Exemplo n.º 5
0
        public async Task <IEnumerable <GetAlunoQueryResponse> > Handle(GetAlunoQuery request, CancellationToken cancellationToken)
        {
            var results = await _alunoRepository.GetAll();

            return(_mapper.Map <IEnumerable <GetAlunoQueryResponse> >(results));
        }
Exemplo n.º 6
0
 public IEnumerable <AlunoViewModel> GetAll()
 {
     return(_alunoRepository.GetAll().ProjectTo <AlunoViewModel>(_mapper.ConfigurationProvider));
 }
Exemplo n.º 7
0
 public IQueryable <Aluno> getAll()
 {
     return(_alunoRepository.GetAll());
 }
        public IEnumerable <Aluno> GetAll()
        {
            var result = _repository.GetAll();

            return(result ?? throw new Exception("Não foram encontrados alunos cadastrados."));
        }
Exemplo n.º 9
0
 public IEnumerable <Aluno> GetAll()
 {
     return(_alunoRepository.GetAll());
 }
Exemplo n.º 10
0
        public IActionResult GetList()
        {
            var list = _context.GetAll();

            return(Ok(list));
        }
Exemplo n.º 11
0
 public IList <AlunoDTO> GetAll()
 {
     return(_alunoRepository.GetAll()
            .Select(aluno => Mapper.Map <AlunoDTO>(aluno))
            .ToList());
 }